Class: WhopSDK::Resources::Payouts::Methods

Inherits:
Object
  • Object
show all
Defined in:
lib/whop_sdk/resources/payouts/methods.rb,
sig/whop_sdk/resources/payouts/methods.rbs

Overview

Payouts represent money sent from an account or user balance to an external destination, such as a bank account, wallet, or other saved payout method.

Use the Payouts API to create payouts from stablecoin accounts, list payout history for accounts or users, monitor payout statuses, and show expected arrival details for funds leaving Whop.

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Methods

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

Parameters:



65
66
67
# File 'lib/whop_sdk/resources/payouts/methods.rb', line 65

def initialize(client:)
  @client = client
end

Instance Method Details

#list(account_id: nil, after: nil, amount: nil, before: nil, currency: nil, first: nil, include_available: nil, last: nil, status: nil, user_id: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::Payouts::MethodListResponse>

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

Lists the saved payout methods (bank accounts, digital wallets, crypto addresses) that an account or user can withdraw to, most recently added first. Pass exactly one of accountid (a biz identifier) or userid (a user identifier). Pass an amount to additionally get a fee and delivery quote per method for withdrawing that amount.

Parameters:

  • account_id (String)

    The owning account ID (a biz_ identifier). Provide this or user_id.

  • after (String)

    Cursor to fetch the page after (from page_info.end_cursor).

  • amount (Float)

    Optional withdrawal amount in whole currency units, for example 250.00. When p

  • before (String)

    Cursor to fetch the page before (from page_info.start_cursor).

  • currency (String)

    Currency code of the amount, for example usd. Only meaningful with amount.

  • first (Integer)

    Number of payout methods to return from the start of the window. Capped at 25 wh

  • include_available (Boolean)

    When true, the response also carries available_destinations — payout rails the a

  • last (Integer)

    Number of payout methods to return from the end of the window.

  • status (Symbol, WhopSDK::Models::Payouts::MethodListParams::Status)

    Optional status filter. created means saved but unused, active means a payou

  • user_id (String)

    The owning user ID (a user_ identifier). Provide this or account_id.

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

Returns:

See Also:



49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/whop_sdk/resources/payouts/methods.rb', line 49

def list(params = {})
  parsed, options = WhopSDK::Payouts::MethodListParams.dump_request(params)
  query = WhopSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "payouts/methods",
    query: query,
    page: WhopSDK::Internal::CursorPage,
    model: WhopSDK::Models::Payouts::MethodListResponse,
    options: options
  )
end