Class: Orb::Models::InvoiceLineItemCreateResponse::Adjustment::TieredPercentageDiscount

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

Defined Under Namespace

Classes: Filter, Tier

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 ⇒ Object



142
# File 'sig/orb/models/invoice_line_item_create_response.rbs', line 142

def initialize: (

Instance Attribute Details

#adjustment_type ⇒ Symbol, :tiered_percentage_discount

Parameters:

  • value (:tiered_percentage_discount)

Returns:

  • (Symbol, :tiered_percentage_discount)


193
# File 'lib/orb/models/invoice_line_item_create_response.rb', line 193

required :adjustment_type, const: :tiered_percentage_discount

#amount ⇒ String

The value applied by an adjustment.

Parameters:

  • value (String)

Returns:

  • (String)


199
# File 'lib/orb/models/invoice_line_item_create_response.rb', line 199

required :amount, String

#applies_to_price_ids ⇒ Array<String>

Deprecated.

The price IDs that this adjustment applies to.

Parameters:

  • value (::Array[String])

Returns:

  • (Array<String>)


207
# File 'lib/orb/models/invoice_line_item_create_response.rb', line 207

required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]

#filters ⇒ Array<Orb::Models::InvoiceLineItemCreateResponse::Adjustment::TieredPercentageDiscount::Filter>

The filters that determine which prices to apply this adjustment to.



213
214
# File 'lib/orb/models/invoice_line_item_create_response.rb', line 213

required :filters,
-> { Orb::Internal::Type::ArrayOf[Orb::Models::InvoiceLineItemCreateResponse::Adjustment::TieredPercentageDiscount::Filter] }

#id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


188
# File 'lib/orb/models/invoice_line_item_create_response.rb', line 188

required :id, String

#is_invoice_level ⇒ Boolean

True for adjustments that apply to an entire invoice, false for adjustments that apply to only one price.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


221
# File 'lib/orb/models/invoice_line_item_create_response.rb', line 221

required :is_invoice_level, Orb::Internal::Type::Boolean

#reason ⇒ String?

The reason for the adjustment.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


227
# File 'lib/orb/models/invoice_line_item_create_response.rb', line 227

required :reason, String, nil?: true

#replaces_adjustment_id ⇒ String?

The adjustment id this adjustment replaces. This adjustment will take the place of the replaced adjustment in plan version migrations.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


234
# File 'lib/orb/models/invoice_line_item_create_response.rb', line 234

required :replaces_adjustment_id, String, nil?: true

#tiers ⇒ Array<Orb::Models::InvoiceLineItemCreateResponse::Adjustment::TieredPercentageDiscount::Tier>

The ordered, contiguous bands of cumulative eligible spend, each discounted at its own percentage (progressive fill-a-tier), applied to the prices this adjustment covers in a given billing period.



242
243
# File 'lib/orb/models/invoice_line_item_create_response.rb', line 242

required :tiers,
-> { Orb::Internal::Type::ArrayOf[Orb::Models::InvoiceLineItemCreateResponse::Adjustment::TieredPercentageDiscount::Tier] }

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/orb/models/invoice_line_item_create_response.rb', line 321

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


154
# File 'sig/orb/models/invoice_line_item_create_response.rbs', line 154

def to_hash: -> {