Class: MetronomeSDK::Models::V1::PlanListChargesResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/metronome_sdk/models/v1/plan_list_charges_response.rb

Overview

Defined Under Namespace

Modules: ChargeType Classes: Price, UnitConversion

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(tier: , value: , collection_interval: nil, collection_schedule: nil, quantity: nil) ⇒ Object

Parameters:

  • tier (Float) (defaults to: )

    Used in pricing tiers. Indicates at what metric value the price applies.

  • value (Float) (defaults to: )
  • collection_interval (Float) (defaults to: nil)
  • collection_schedule (String) (defaults to: nil)
  • quantity (Float) (defaults to: nil)


# File 'lib/metronome_sdk/models/v1/plan_list_charges_response.rb', line 75


Instance Attribute Details

#charge_typeSymbol, MetronomeSDK::Models::V1::PlanListChargesResponse::ChargeType



16
# File 'lib/metronome_sdk/models/v1/plan_list_charges_response.rb', line 16

required :charge_type, enum: -> { MetronomeSDK::Models::V1::PlanListChargesResponse::ChargeType }

#credit_typeMetronomeSDK::Models::CreditTypeData



21
# File 'lib/metronome_sdk/models/v1/plan_list_charges_response.rb', line 21

required :credit_type, -> { MetronomeSDK::CreditTypeData }

#custom_fieldsHash{Symbol=>String}

Custom fields to be added eg. { “key1”: “value1”, “key2”: “value2” }

Returns:

  • (Hash{Symbol=>String})


27
# File 'lib/metronome_sdk/models/v1/plan_list_charges_response.rb', line 27

required :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]

#idString

Returns:

  • (String)


11
# File 'lib/metronome_sdk/models/v1/plan_list_charges_response.rb', line 11

required :id, String

#nameString

Returns:

  • (String)


32
# File 'lib/metronome_sdk/models/v1/plan_list_charges_response.rb', line 32

required :name, String

#pricesArray<MetronomeSDK::Models::V1::PlanListChargesResponse::Price>



37
38
# File 'lib/metronome_sdk/models/v1/plan_list_charges_response.rb', line 37

required :prices,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::PlanListChargesResponse::Price] }

#product_idString

Returns:

  • (String)


43
# File 'lib/metronome_sdk/models/v1/plan_list_charges_response.rb', line 43

required :product_id, String

#product_nameString

Returns:

  • (String)


48
# File 'lib/metronome_sdk/models/v1/plan_list_charges_response.rb', line 48

required :product_name, String

#quantityFloat?

Returns:

  • (Float, nil)


53
# File 'lib/metronome_sdk/models/v1/plan_list_charges_response.rb', line 53

optional :quantity, Float

#start_periodFloat?

Used in price ramps. Indicates how many billing periods pass before the charge applies.

Returns:

  • (Float, nil)


60
# File 'lib/metronome_sdk/models/v1/plan_list_charges_response.rb', line 60

optional :start_period, Float

#tier_reset_frequencyFloat?

Used in pricing tiers. Indicates how often the tier resets. Default is 1 - the tier count resets every billing period.

Returns:

  • (Float, nil)


67
# File 'lib/metronome_sdk/models/v1/plan_list_charges_response.rb', line 67

optional :tier_reset_frequency, Float

#unit_conversionMetronomeSDK::Models::V1::PlanListChargesResponse::UnitConversion?

Specifies how quantities for usage based charges will be converted.



73
# File 'lib/metronome_sdk/models/v1/plan_list_charges_response.rb', line 73

optional :unit_conversion, -> { MetronomeSDK::Models::V1::PlanListChargesResponse::UnitConversion }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/metronome_sdk/models/v1/plan_list_charges_response.rb', line 113