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>
A setup intent is an object used to securely collect and store a member’s payment method for future use without charging them immediately.
-
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::SetupIntent
A setup intent is an object used to securely collect and store a member’s payment method for future use without charging them immediately.
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.
86 87 88 |
# File 'lib/whop_sdk/resources/setup_intents.rb', line 86 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>
A setup intent is an object used to securely collect and store a member’s payment method for future use without charging them immediately. It handles authentication steps up front so future off-session payments can be completed smoothly. This ensures the payment method is verified and ready for later billing.
Required permissions:
-
‘payment:setup_intent:read`
-
‘member:basic:read`
-
‘member:email:read`
71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/whop_sdk/resources/setup_intents.rb', line 71 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
A setup intent is an object used to securely collect and store a member’s payment method for future use without charging them immediately. It handles authentication steps up front so future off-session payments can be completed smoothly. This ensures the payment method is verified and ready for later billing.
Required permissions:
-
‘payment:setup_intent:read`
-
‘member:basic:read`
-
‘member:email:read`
27 28 29 30 31 32 33 34 |
# File 'lib/whop_sdk/resources/setup_intents.rb', line 27 def retrieve(id, params = {}) @client.request( method: :get, path: ["setup_intents/%1$s", id], model: WhopSDK::SetupIntent, options: params[:request_options] ) end |