Class: WhopSDK::Resources::Withdrawals
- Inherits:
-
Object
- Object
- WhopSDK::Resources::Withdrawals
- Defined in:
- lib/whop_sdk/resources/withdrawals.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Withdrawals
constructor
private
A new instance of Withdrawals.
-
#list(company_id: , after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::WithdrawalListResponse>
Lists withdrawals.
-
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::WithdrawalRetrieveResponse
Retrieves a withdrawal by ID.
Constructor Details
#initialize(client:) ⇒ Withdrawals
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 Withdrawals.
74 75 76 |
# File 'lib/whop_sdk/resources/withdrawals.rb', line 74 def initialize(client:) @client = client end |
Instance Method Details
#list(company_id: , after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::WithdrawalListResponse>
Lists withdrawals
Required permissions:
-
‘payout:withdrawal:read`
59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/whop_sdk/resources/withdrawals.rb', line 59 def list(params) parsed, = WhopSDK::WithdrawalListParams.dump_request(params) @client.request( method: :get, path: "withdrawals", query: parsed, page: WhopSDK::Internal::CursorPage, model: WhopSDK::Models::WithdrawalListResponse, options: ) end |
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::WithdrawalRetrieveResponse
Retrieves a withdrawal by ID
Required permissions:
-
‘payout:withdrawal:read`
21 22 23 24 25 26 27 28 |
# File 'lib/whop_sdk/resources/withdrawals.rb', line 21 def retrieve(id, params = {}) @client.request( method: :get, path: ["withdrawals/%1$s", id], model: WhopSDK::Models::WithdrawalRetrieveResponse, options: params[:request_options] ) end |