Class: Orb::Models::Price::TieredWithMinimum::TieredWithMinimumConfig::Tier

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/price.rb,
sig/orb/models/price.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(tiers:, hide_zero_amount_tiers: nil, prorate: nil) ⇒ Object

Some parameter documentations has been truncated, see Orb::Models::Price::TieredWithMinimum::TieredWithMinimumConfig for more details.

Configuration for tiered_with_minimum pricing

Parameters:

  • tiers (Array<Orb::Models::Price::TieredWithMinimum::TieredWithMinimumConfig::Tier>) —

    Tiered pricing with a minimum amount dependent on the volume tier. Tiers are def

  • hide_zero_amount_tiers (Boolean) (defaults to: nil) —

    If true, tiers with an accrued amount of 0 will not be included in the rating.

  • prorate (Boolean) (defaults to: nil) —

    If true, the unit price will be prorated to the billing period



3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
# File 'lib/orb/models/price.rb', line 3546

class Tier < Orb::Internal::Type::BaseModel
  # @!attribute minimum_amount
  #
  #   @return [String]
  required :minimum_amount, String

  # @!attribute tier_lower_bound
  #
  #   @return [String]
  required :tier_lower_bound, String

  # @!attribute unit_amount
  #   Per unit amount
  #
  #   @return [String]
  required :unit_amount, String

  # @!method initialize(minimum_amount:, tier_lower_bound:, unit_amount:)
  #   Configuration for a single tier
  #
  #   @param minimum_amount [String]
  #
  #   @param tier_lower_bound [String]
  #
  #   @param unit_amount [String] Per unit amount
end

Instance Attribute Details

#minimum_amount ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


3550
# File 'lib/orb/models/price.rb', line 3550

required :minimum_amount, String

#tier_lower_bound ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


3555
# File 'lib/orb/models/price.rb', line 3555

required :tier_lower_bound, String

#unit_amount ⇒ String

Per unit amount

Parameters:

  • value (String)

Returns:

  • (String)


3561
# File 'lib/orb/models/price.rb', line 3561

required :unit_amount, String

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


2643
# File 'sig/orb/models/price.rbs', line 2643

def to_hash: -> {