Class: WhopSDK::Resources::Deposits
- Inherits:
-
Object
- Object
- WhopSDK::Resources::Deposits
- Defined in:
- lib/whop_sdk/resources/deposits.rb,
sig/whop_sdk/resources/deposits.rbs
Overview
Deposits describe ways to add funds to an account balance, including hosted deposit pages, bank deposit instructions, and supported crypto wallet addresses.
Use the Deposits API to create deposit instructions for an account and retrieve existing bank deposit activity.
Instance Method Summary collapse
-
#create(destination:, amount: nil, metadata: nil, network: nil, request_options: {}) ⇒ WhopSDK::Models::DepositCreateResponse
Some parameter documentations has been truncated, see Models::DepositCreateParams for more details.
-
#initialize(client:) ⇒ Deposits
constructor
private
A new instance of Deposits.
-
#list(account_id:, request_options: {}) ⇒ WhopSDK::Models::DepositListResponse
Returns deposit transactions for a business account.
Constructor Details
#initialize(client:) ⇒ Deposits
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 Deposits.
72 73 74 |
# File 'lib/whop_sdk/resources/deposits.rb', line 72 def initialize(client:) @client = client end |
Instance Method Details
#create(destination:, amount: nil, metadata: nil, network: nil, request_options: {}) ⇒ WhopSDK::Models::DepositCreateResponse
Some parameter documentations has been truncated, see Models::DepositCreateParams for more details.
Resolves a deposit destination and returns the on-chain addresses that can fund it. No authentication is required; any business can be resolved by its account ID. A caller authenticated as a user can additionally resolve their own user account.
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/whop_sdk/resources/deposits.rb', line 34 def create(params) parsed, = WhopSDK::DepositCreateParams.dump_request(params) @client.request( method: :post, path: "deposits", body: parsed, model: WhopSDK::Models::DepositCreateResponse, options: ) end |
#list(account_id:, request_options: {}) ⇒ WhopSDK::Models::DepositListResponse
Returns deposit transactions for a business account. Bank deposit transactions are nested under the bank field.
57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/whop_sdk/resources/deposits.rb', line 57 def list(params) parsed, = WhopSDK::DepositListParams.dump_request(params) query = WhopSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "deposits", query: query, model: WhopSDK::Models::DepositListResponse, options: ) end |