Class: Orb::Models::Price::BulkWithProration::BulkWithProrationConfig::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:) ⇒ Object

Configuration for bulk_with_proration pricing

Parameters:



8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
# File 'lib/orb/models/price.rb', line 8396

class Tier < Orb::Internal::Type::BaseModel
  # @!attribute unit_amount
  #   Cost per unit
  #
  #   @return [String]
  required :unit_amount, String

  # @!attribute tier_lower_bound
  #   The lower bound for this tier
  #
  #   @return [String, nil]
  optional :tier_lower_bound, String, nil?: true

  # @!method initialize(unit_amount:, tier_lower_bound: nil)
  #   Configuration for a single bulk pricing tier with proration
  #
  #   @param unit_amount [String] Cost per unit
  #
  #   @param tier_lower_bound [String, nil] The lower bound for this tier
end

Instance Attribute Details

#tier_lower_bound ⇒ String?

The lower bound for this tier

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :tier_lower_bound, String, nil?: true

#unit_amount ⇒ String

Cost per unit

Parameters:

  • value (String)

Returns:

  • (String)


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

required :unit_amount, String

Instance Method Details

#to_hash ⇒ { unit_amount: String, tier_lower_bound: String? }

Returns:

  • ({ unit_amount: String, tier_lower_bound: String? })


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

def to_hash: -> { unit_amount: String, tier_lower_bound: String? }