Class: Orb::Models::UnitConfig

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

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(unit_amount:, prorated: nil) ⇒ UnitConfig

Configuration for unit pricing

Parameters:

  • unit_amount (String)

    Rate per unit of usage

  • prorated (Boolean) (defaults to: nil)

    If true, subtotals from this price are prorated based on the service period

  • unit_amount: (String)
  • prorated: (Boolean) (defaults to: nil)


# File 'lib/orb/models/unit_config.rb', line 18

Instance Attribute Details

#proratedBoolean?

If true, subtotals from this price are prorated based on the service period

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


16
# File 'lib/orb/models/unit_config.rb', line 16

optional :prorated, Orb::Internal::Type::Boolean

#unit_amountString

Rate per unit of usage

Parameters:

  • value (String)

Returns:

  • (String)


10
# File 'lib/orb/models/unit_config.rb', line 10

required :unit_amount, String

Instance Method Details

#to_hash{ unit_amount: String, prorated: bool }

Returns:

  • ({ unit_amount: String, prorated: bool })


14
# File 'sig/orb/models/unit_config.rbs', line 14

def to_hash: -> { unit_amount: String, prorated: bool }