Class: MetronomeSDK::Resources::V1::PricingUnits
- Inherits:
-
Object
- Object
- MetronomeSDK::Resources::V1::PricingUnits
- Defined in:
- lib/metronome_sdk/resources/v1/pricing_units.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ PricingUnits
constructor
private
A new instance of PricingUnits.
-
#list(limit: nil, next_page: nil, request_options: {}) ⇒ MetronomeSDK::Internal::CursorPage<MetronomeSDK::Models::V1::PricingUnitListResponse>
List all pricing units.
Constructor Details
#initialize(client:) ⇒ PricingUnits
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 PricingUnits.
40 41 42 |
# File 'lib/metronome_sdk/resources/v1/pricing_units.rb', line 40 def initialize(client:) @client = client end |
Instance Method Details
#list(limit: nil, next_page: nil, request_options: {}) ⇒ MetronomeSDK::Internal::CursorPage<MetronomeSDK::Models::V1::PricingUnitListResponse>
List all pricing units. All fiat currency types (for example, USD or GBP) will be included, as well as any custom pricing units that were configured. Custom pricing units can be used to charge for usage in a non-fiat pricing unit, for example AI credits.
Note: The USD (cents) pricing unit is 2714e483-4ff1-48e4-9e25-ac732e8f24f2.
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/metronome_sdk/resources/v1/pricing_units.rb', line 25 def list(params = {}) parsed, = MetronomeSDK::V1::PricingUnitListParams.dump_request(params) @client.request( method: :get, path: "v1/credit-types/list", query: parsed, page: MetronomeSDK::Internal::CursorPage, model: MetronomeSDK::Models::V1::PricingUnitListResponse, options: ) end |