Class: WhopSDK::Resources::PaymentTokens
- Inherits:
-
Object
- Object
- WhopSDK::Resources::PaymentTokens
- Defined in:
- lib/whop_sdk/resources/payment_tokens.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ PaymentTokens
constructor
private
A new instance of PaymentTokens.
-
#list(member_id: , after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::PaymentTokenListResponse>
Lists PaymentTokens.
-
#retrieve(id, member_id: , request_options: {}) ⇒ WhopSDK::Models::PaymentTokenRetrieveResponse
Retrieves a PaymentToken by ID.
Constructor Details
#initialize(client:) ⇒ PaymentTokens
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 PaymentTokens.
78 79 80 |
# File 'lib/whop_sdk/resources/payment_tokens.rb', line 78 def initialize(client:) @client = client end |
Instance Method Details
#list(member_id: , after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::PaymentTokenListResponse>
Lists PaymentTokens
Required permissions:
-
‘member:payment_methods:read`
63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/whop_sdk/resources/payment_tokens.rb', line 63 def list(params) parsed, = WhopSDK::PaymentTokenListParams.dump_request(params) @client.request( method: :get, path: "payment_tokens", query: parsed, page: WhopSDK::Internal::CursorPage, model: WhopSDK::Models::PaymentTokenListResponse, options: ) end |
#retrieve(id, member_id: , request_options: {}) ⇒ WhopSDK::Models::PaymentTokenRetrieveResponse
Retrieves a PaymentToken by ID
Required permissions:
-
‘member:payment_methods:read`
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/whop_sdk/resources/payment_tokens.rb', line 23 def retrieve(id, params) parsed, = WhopSDK::PaymentTokenRetrieveParams.dump_request(params) @client.request( method: :get, path: ["payment_tokens/%1$s", id], query: parsed, model: WhopSDK::Models::PaymentTokenRetrieveResponse, options: ) end |