Class: WhopSDK::Resources::FeeMarkups
- Inherits:
-
Object
- Object
- WhopSDK::Resources::FeeMarkups
- Defined in:
- lib/whop_sdk/resources/fee_markups.rb
Overview
Fee markups
Instance Method Summary collapse
-
#create(company_id:, fee_type:, fixed_fee_usd: nil, metadata: nil, notes: nil, percentage_fee: nil, request_options: {}) ⇒ WhopSDK::Models::FeeMarkupCreateResponse
Some parameter documentations has been truncated, see Models::FeeMarkupCreateParams for more details.
-
#delete(id, request_options: {}) ⇒ Boolean
Delete a fee markup configuration for a company.
-
#initialize(client:) ⇒ FeeMarkups
constructor
private
A new instance of FeeMarkups.
-
#list(company_id:, after: nil, before: nil, first: nil, last: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::FeeMarkupListResponse>
Some parameter documentations has been truncated, see Models::FeeMarkupListParams for more details.
Constructor Details
#initialize(client:) ⇒ FeeMarkups
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 FeeMarkups.
115 116 117 |
# File 'lib/whop_sdk/resources/fee_markups.rb', line 115 def initialize(client:) @client = client end |
Instance Method Details
#create(company_id:, fee_type:, fixed_fee_usd: nil, metadata: nil, notes: nil, percentage_fee: nil, request_options: {}) ⇒ WhopSDK::Models::FeeMarkupCreateResponse
Some parameter documentations has been truncated, see Models::FeeMarkupCreateParams for more details.
Create or update a fee markup for a company. If a markup for the specified fee type already exists, it will be updated with the new values.
Required permissions:
-
‘company:update_child_fees`
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/whop_sdk/resources/fee_markups.rb', line 36 def create(params) parsed, = WhopSDK::FeeMarkupCreateParams.dump_request(params) @client.request( method: :post, path: "fee_markups", body: parsed, model: WhopSDK::Models::FeeMarkupCreateResponse, options: ) end |
#delete(id, request_options: {}) ⇒ Boolean
Delete a fee markup configuration for a company. This removes the custom fee override and reverts to the parent company’s default fees.
Required permissions:
-
‘company:update_child_fees`
103 104 105 106 107 108 109 110 |
# File 'lib/whop_sdk/resources/fee_markups.rb', line 103 def delete(id, params = {}) @client.request( method: :delete, path: ["fee_markups/%1$s", id], model: WhopSDK::Internal::Type::Boolean, options: params[:request_options] ) end |
#list(company_id:, after: nil, before: nil, first: nil, last: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::FeeMarkupListResponse>
Some parameter documentations has been truncated, see Models::FeeMarkupListParams for more details.
Returns a paginated list of fee markups configured for a company. If the company is a platform account, returns the platform default markups.
Required permissions:
-
‘company:update_child_fees`
74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/whop_sdk/resources/fee_markups.rb', line 74 def list(params) parsed, = WhopSDK::FeeMarkupListParams.dump_request(params) query = WhopSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "fee_markups", query: query, page: WhopSDK::Internal::CursorPage, model: WhopSDK::Models::FeeMarkupListResponse, options: ) end |