Class: WhopSDK::Resources::PayoutMethods
- Inherits:
-
Object
- Object
- WhopSDK::Resources::PayoutMethods
- Defined in:
- lib/whop_sdk/resources/payout_methods.rb
Overview
Payout methods
Instance Method Summary collapse
-
#initialize(client:) ⇒ PayoutMethods
constructor
private
A new instance of PayoutMethods.
-
#list(company_id:, after: nil, before: nil, first: nil, last: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::PayoutMethodListResponse>
Returns a list of active payout methods configured for a company, ordered by most recently created.
-
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::PayoutMethodRetrieveResponse
Retrieves the details of an existing payout method.
Constructor Details
#initialize(client:) ⇒ PayoutMethods
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 PayoutMethods.
71 72 73 |
# File 'lib/whop_sdk/resources/payout_methods.rb', line 71 def initialize(client:) @client = client end |
Instance Method Details
#list(company_id:, after: nil, before: nil, first: nil, last: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::PayoutMethodListResponse>
Returns a list of active payout methods configured for a company, ordered by most recently created.
Required permissions:
-
‘payout:destination:read`
55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/whop_sdk/resources/payout_methods.rb', line 55 def list(params) parsed, = WhopSDK::PayoutMethodListParams.dump_request(params) query = WhopSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "payout_methods", query: query, page: WhopSDK::Internal::CursorPage, model: WhopSDK::Models::PayoutMethodListResponse, options: ) end |
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::PayoutMethodRetrieveResponse
Retrieves the details of an existing payout method.
Required permissions:
-
‘payout:destination:read`
22 23 24 25 26 27 28 29 |
# File 'lib/whop_sdk/resources/payout_methods.rb', line 22 def retrieve(id, params = {}) @client.request( method: :get, path: ["payout_methods/%1$s", id], model: WhopSDK::Models::PayoutMethodRetrieveResponse, options: params[:request_options] ) end |