Class: Dodopayments::Resources::Customers::Wallets

Inherits:
Object
  • Object
show all
Defined in:
lib/dodopayments/resources/customers/wallets.rb,
lib/dodopayments/resources/customers/wallets/ledger_entries.rb

Defined Under Namespace

Classes: LedgerEntries

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Wallets

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Wallets.

Parameters:



31
32
33
34
# File 'lib/dodopayments/resources/customers/wallets.rb', line 31

def initialize(client:)
  @client = client
  @ledger_entries = Dodopayments::Resources::Customers::Wallets::LedgerEntries.new(client: client)
end

Instance Attribute Details

#ledger_entriesDodopayments::Resources::Customers::Wallets::LedgerEntries (readonly)



8
9
10
# File 'lib/dodopayments/resources/customers/wallets.rb', line 8

def ledger_entries
  @ledger_entries
end

Instance Method Details

#list(customer_id, request_options: {}) ⇒ Dodopayments::Models::Customers::WalletListResponse

Parameters:

Returns:

See Also:



19
20
21
22
23
24
25
26
# File 'lib/dodopayments/resources/customers/wallets.rb', line 19

def list(customer_id, params = {})
  @client.request(
    method: :get,
    path: ["customers/%1$s/wallets", customer_id],
    model: Dodopayments::Models::Customers::WalletListResponse,
    options: params[:request_options]
  )
end