Class: Orb::Models::NewFloatingUnitWithPercentPrice::UnitWithPercentConfig

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/new_floating_unit_with_percent_price.rb,
sig/orb/models/new_floating_unit_with_percent_price.rbs

Overview

See Also:

  • Orb::Models::NewFloatingUnitWithPercentPrice#unit_with_percent_config

Instance Attribute 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(percent:, unit_amount:) ⇒ UnitWithPercentConfig

Configuration for unit_with_percent pricing

Parameters:

  • percent (String)

    What percent, out of 100, of the calculated total to charge

  • unit_amount (String)

    Rate per unit of usage

  • percent: (String)
  • unit_amount: (String)


# File 'lib/orb/models/new_floating_unit_with_percent_price.rb', line 204

Instance Attribute Details

#percentString

What percent, out of 100, of the calculated total to charge

Parameters:

  • value (String)

Returns:

  • (String)


196
# File 'lib/orb/models/new_floating_unit_with_percent_price.rb', line 196

required :percent, String

#unit_amountString

Rate per unit of usage

Parameters:

  • value (String)

Returns:

  • (String)


202
# File 'lib/orb/models/new_floating_unit_with_percent_price.rb', line 202

required :unit_amount, String

Instance Method Details

#to_hash{ percent: String, unit_amount: String }

Returns:

  • ({ percent: String, unit_amount: String })


139
# File 'sig/orb/models/new_floating_unit_with_percent_price.rbs', line 139

def to_hash: -> { percent: String, unit_amount: String }