Class: WhopSDK::Resources::LedgerAccounts

Inherits:
Object
  • Object
show all
Defined in:
lib/whop_sdk/resources/ledger_accounts.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ LedgerAccounts

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 LedgerAccounts.

Parameters:



36
37
38
# File 'lib/whop_sdk/resources/ledger_accounts.rb', line 36

def initialize(client:)
  @client = client
end

Instance Method Details

#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::LedgerAccountRetrieveResponse

Some parameter documentations has been truncated, see Models::LedgerAccountRetrieveParams for more details.

Retrieves a ledger account by its ID, company ID or user ID

Required permissions:

  • ‘company:balance:read`

Parameters:

  • id (String)

    Either a User ID, Company ID, or LedgerAccount ID (user_xxx, biz_xxx, or ldgr_xx

  • request_options (WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



24
25
26
27
28
29
30
31
# File 'lib/whop_sdk/resources/ledger_accounts.rb', line 24

def retrieve(id, params = {})
  @client.request(
    method: :get,
    path: ["ledger_accounts/%1$s", id],
    model: WhopSDK::Models::LedgerAccountRetrieveResponse,
    options: params[:request_options]
  )
end