Class: WhopSDK::Resources::SetupIntents
- Inherits:
-
Object
- Object
- WhopSDK::Resources::SetupIntents
- Defined in:
- lib/whop_sdk/resources/setup_intents.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ SetupIntents
constructor
private
A new instance of SetupIntents.
-
#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::SetupIntentListResponse>
Lists Setup Intents.
-
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::SetupIntent
Retrieves a Setup Intent by ID.
Constructor Details
#initialize(client:) ⇒ SetupIntents
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 SetupIntents.
78 79 80 |
# File 'lib/whop_sdk/resources/setup_intents.rb', line 78 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::SetupIntentListResponse>
Lists Setup Intents
Required permissions:
-
‘payment:setup_intent:read`
-
‘member:basic:read`
-
‘member:email:read`
63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/whop_sdk/resources/setup_intents.rb', line 63 def list(params) parsed, = WhopSDK::SetupIntentListParams.dump_request(params) @client.request( method: :get, path: "setup_intents", query: parsed, page: WhopSDK::Internal::CursorPage, model: WhopSDK::Models::SetupIntentListResponse, options: ) end |
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::SetupIntent
Retrieves a Setup Intent by ID
Required permissions:
-
‘payment:setup_intent:read`
-
‘member:basic:read`
-
‘member:email:read`
23 24 25 26 27 28 29 30 |
# File 'lib/whop_sdk/resources/setup_intents.rb', line 23 def retrieve(id, params = {}) @client.request( method: :get, path: ["setup_intents/%1$s", id], model: WhopSDK::SetupIntent, options: params[:request_options] ) end |