Class: WhopSDK::Resources::Topups
- Inherits:
-
Object
- Object
- WhopSDK::Resources::Topups
- Defined in:
- lib/whop_sdk/resources/topups.rb
Overview
Topups
Instance Method Summary collapse
-
#create(amount:, company_id:, currency:, payment_method_id:, request_options: {}) ⇒ WhopSDK::Models::TopupCreateResponse
Some parameter documentations has been truncated, see Models::TopupCreateParams for more details.
-
#initialize(client:) ⇒ Topups
constructor
private
A new instance of Topups.
Constructor Details
#initialize(client:) ⇒ Topups
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 Topups.
46 47 48 |
# File 'lib/whop_sdk/resources/topups.rb', line 46 def initialize(client:) @client = client end |
Instance Method Details
#create(amount:, company_id:, currency:, payment_method_id:, request_options: {}) ⇒ WhopSDK::Models::TopupCreateResponse
Some parameter documentations has been truncated, see Models::TopupCreateParams for more details.
Add funds to a company’s platform balance by charging a stored payment method. Top-ups have no fees or taxes and do not count as revenue.
Required permissions:
-
‘payment:charge`
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/whop_sdk/resources/topups.rb', line 32 def create(params) parsed, = WhopSDK::TopupCreateParams.dump_request(params) @client.request( method: :post, path: "topups", body: parsed, model: WhopSDK::Models::TopupCreateResponse, options: ) end |