Sha256: 31239a0ec84d5ddb38688fe0414fa5f9e08e8f6d31f98761012675713eeef4dc

Contents?: true

Size: 430 Bytes

Versions: 27

Compression:

Stored size: 430 Bytes

Contents

module Octobat
  class PaymentSource < APIResource
    extend Octobat::APIOperations::List
    include Octobat::APIOperations::Create

    def self.url
      if @parent_resource.include?(:customer)
        "#{Customer.url}/#{CGI.escape(@parent_resource[:customer])}/payment_sources"
      end
    end

    def self.parent_resource(filters)
      @parent_resource = filters.select{|k, v| [:customer].include?(k)}
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
octobat-2.0.27 lib/octobat/payment_source.rb
octobat-2.0.26 lib/octobat/payment_source.rb
octobat-2.0.25 lib/octobat/payment_source.rb
octobat-2.0.24 lib/octobat/payment_source.rb
octobat-2.0.23 lib/octobat/payment_source.rb
octobat-2.0.22 lib/octobat/payment_source.rb
octobat-2.0.21 lib/octobat/payment_source.rb
octobat-2.0.20 lib/octobat/payment_source.rb
octobat-2.0.19 lib/octobat/payment_source.rb
octobat-2.0.18 lib/octobat/payment_source.rb
octobat-2.0.17 lib/octobat/payment_source.rb
octobat-2.0.16 lib/octobat/payment_source.rb
octobat-2.0.15 lib/octobat/payment_source.rb
octobat-2.0.14 lib/octobat/payment_source.rb
octobat-2.0.12 lib/octobat/payment_source.rb
octobat-2.0.11 lib/octobat/payment_source.rb
octobat-2.0.10 lib/octobat/payment_source.rb
octobat-2.0.9 lib/octobat/payment_source.rb
octobat-2.0.8 lib/octobat/payment_source.rb
octobat-2.0.7 lib/octobat/payment_source.rb