Sha256: d24d6153ab816b920f286adb171bfd08f83bbda28161cb83304a7a6eea36b478

Contents?: true

Size: 574 Bytes

Versions: 5

Compression:

Stored size: 574 Bytes

Contents

require 'open-uri'

module Mollie
  module API
    module Resource
      class Customers
        class Payments < Base
          @customer_id = nil

          def resource_object
            Object::Payment
          end

          def resource_name
            customer_id = URI::encode(@customer_id)
            "customers/#{customer_id}/payments"
          end

          def with(customer_or_id)
            @customer_id = customer_or_id.is_a?(Object::Customer) ? customer_or_id.id : customer_or_id
            self
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mollie-api-ruby-2.2.1 lib/mollie/api/resource/customers/payments.rb
mollie-api-ruby-2.2.0 lib/mollie/api/resource/customers/payments.rb
mollie-api-ruby-2.1.0 lib/mollie/api/resource/customers/payments.rb
mollie-api-ruby-2.0.1 lib/mollie/api/resource/customers/payments.rb
mollie-api-ruby-2.0.0 lib/mollie/api/resource/customers/payments.rb