Class: WhopSDK::Resources::PaymentMethods
- Inherits:
-
Object
- Object
- WhopSDK::Resources::PaymentMethods
- Defined in:
- lib/whop_sdk/resources/payment_methods.rb
Overview
Payment methods
Instance Method Summary collapse
-
#initialize(client:) ⇒ PaymentMethods
constructor
private
A new instance of PaymentMethods.
-
#list(after: nil, before: nil, company_id: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, member_id: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::PaymentMethodListResponse::BasePaymentMethod, WhopSDK::Models::PaymentMethodListResponse::CardPaymentMethod, WhopSDK::Models::PaymentMethodListResponse::UsBankAccountPaymentMethod, WhopSDK::Models::PaymentMethodListResponse::CashappPaymentMethod, WhopSDK::Models::PaymentMethodListResponse::IdealPaymentMethod, WhopSDK::Models::PaymentMethodListResponse::SepaDebitPaymentMethod>
Some parameter documentations has been truncated, see Models::PaymentMethodListParams for more details.
-
#retrieve(id, company_id: nil, member_id: nil, request_options: {}) ⇒ WhopSDK::Models::PaymentMethodRetrieveResponse::BasePaymentMethod, ...
Some parameter documentations has been truncated, see Models::PaymentMethodRetrieveParams for more details.
Constructor Details
#initialize(client:) ⇒ PaymentMethods
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 PaymentMethods.
94 95 96 |
# File 'lib/whop_sdk/resources/payment_methods.rb', line 94 def initialize(client:) @client = client end |
Instance Method Details
#list(after: nil, before: nil, company_id: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, member_id: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::PaymentMethodListResponse::BasePaymentMethod, WhopSDK::Models::PaymentMethodListResponse::CardPaymentMethod, WhopSDK::Models::PaymentMethodListResponse::UsBankAccountPaymentMethod, WhopSDK::Models::PaymentMethodListResponse::CashappPaymentMethod, WhopSDK::Models::PaymentMethodListResponse::IdealPaymentMethod, WhopSDK::Models::PaymentMethodListResponse::SepaDebitPaymentMethod>
Some parameter documentations has been truncated, see Models::PaymentMethodListParams for more details.
Returns a paginated list of payment methods for a member or company, with optional filtering by creation date. A payment method is a stored representation of how a customer intends to pay, such as a card, bank account, or digital wallet.
Required permissions:
-
‘member:payment_methods:read`
78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/whop_sdk/resources/payment_methods.rb', line 78 def list(params = {}) parsed, = WhopSDK::PaymentMethodListParams.dump_request(params) query = WhopSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "payment_methods", query: query, page: WhopSDK::Internal::CursorPage, model: WhopSDK::Models::PaymentMethodListResponse, options: ) end |
#retrieve(id, company_id: nil, member_id: nil, request_options: {}) ⇒ WhopSDK::Models::PaymentMethodRetrieveResponse::BasePaymentMethod, ...
Some parameter documentations has been truncated, see Models::PaymentMethodRetrieveParams for more details.
Retrieves the details of an existing payment method.
Required permissions:
-
‘member:payment_methods:read`
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/whop_sdk/resources/payment_methods.rb', line 29 def retrieve(id, params = {}) parsed, = WhopSDK::PaymentMethodRetrieveParams.dump_request(params) query = WhopSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["payment_methods/%1$s", id], query: query, model: WhopSDK::Models::PaymentMethodRetrieveResponse, options: ) end |