Class: WhopSDK::Resources::Deposits
- Inherits:
-
Object
- Object
- WhopSDK::Resources::Deposits
- Defined in:
- lib/whop_sdk/resources/deposits.rb
Instance Method Summary collapse
-
#create(amount:, destination:, 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.
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.
41 42 43 |
# File 'lib/whop_sdk/resources/deposits.rb', line 41 def initialize(client:) @client = client end |
Instance Method Details
#create(amount:, destination:, 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.
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/whop_sdk/resources/deposits.rb', line 27 def create(params) parsed, = WhopSDK::DepositCreateParams.dump_request(params) @client.request( method: :post, path: "deposits", body: parsed, model: WhopSDK::Models::DepositCreateResponse, options: ) end |