Class: WhopSDK::Resources::Deposits

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

Instance Method Summary collapse

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.

Parameters:



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.

Parameters:

Returns:

See Also:



27
28
29
30
31
32
33
34
35
36
# File 'lib/whop_sdk/resources/deposits.rb', line 27

def create(params)
  parsed, options = WhopSDK::DepositCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "deposits",
    body: parsed,
    model: WhopSDK::Models::DepositCreateResponse,
    options: options
  )
end