Sha256: 6dd782bdd200a3d0d260608277b13522519a7558ad9829e1f670ec8264ae6fc4

Contents?: true

Size: 656 Bytes

Versions: 3

Compression:

Stored size: 656 Bytes

Contents

module Octobat
  class Customer < APIResource
    extend Octobat::APIOperations::List
    include Octobat::APIOperations::Create
    include Octobat::APIOperations::Update
    include Octobat::APIOperations::Delete

    def invoices(params = {}, opts = {})
      Invoice.list(params.merge({ :customer => id }), {api_key: @api_key}.merge(opts))
    end

    def credit_notes(params = {}, opts = {})
      CreditNote.list(params.merge({ :customer => id }), {api_key: @api_key}.merge(opts))
    end

    def payment_sources(params = {}, opts = {})
      PaymentSource.list(params.merge({ :customer => id }), {api_key: @api_key}.merge(opts))
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
octobat-2.0.21 lib/octobat/customer.rb
octobat-2.0.20 lib/octobat/customer.rb
octobat-2.0.19 lib/octobat/customer.rb