Class: Orb::Models::InvoiceFetchUpcomingResponse::LineItem

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

Defined Under Namespace

Modules: Adjustment, SubLineItem

Constant Summary collapse

Orb =

Returns:

  • (:MonetaryUsageDiscountAdjustment)

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(lower_bound:, percentage:, upper_bound: nil) ⇒ Object

Some parameter documentations has been truncated, see Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::TieredPercentageDiscount::Tier for more details.

One band of a tiered percentage discount. Bounds are denominated in the discount's currency. lower_bound is the exclusive start of the band and upper_bound is the inclusive end; upper_bound is null only for the open-ended final tier.

Parameters:

  • lower_bound (Float)

    Exclusive lower bound of cumulative spend for this tier.

  • percentage (Float)

    The percentage (between 0 and 1) discounted from spend that falls within this ti

  • upper_bound (Float, nil) (defaults to: nil)

    Inclusive upper bound of cumulative spend for this tier; null for the final open



# File 'lib/orb/models/invoice_fetch_upcoming_response.rb', line 1076

Instance Attribute Details

#adjusted_subtotalString

The line amount after any adjustments and before overage conversion, credits and partial invoicing.

Parameters:

  • value (String)

Returns:

  • (String)


747
# File 'lib/orb/models/invoice_fetch_upcoming_response.rb', line 747

required :adjusted_subtotal, String

#adjustmentsArray<Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::TieredPercentageDiscount, Orb::Models::MonetaryMinimumAdjustment, Orb::Models::MonetaryMaximumAdjustment>

All adjustments applied to the line item in the order they were applied based on invoice calculations (ie. usage discounts -> amount discounts -> percentage discounts -> minimums -> maximums).



755
756
# File 'lib/orb/models/invoice_fetch_upcoming_response.rb', line 755

required :adjustments,
-> { Orb::Internal::Type::ArrayOf[union: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment] }

#amountString

The final amount for a line item after all adjustments and pre paid credits have been applied.

Parameters:

  • value (String)

Returns:

  • (String)


763
# File 'lib/orb/models/invoice_fetch_upcoming_response.rb', line 763

required :amount, String

#credits_appliedString

The number of prepaid credits applied.

Parameters:

  • value (String)

Returns:

  • (String)


769
# File 'lib/orb/models/invoice_fetch_upcoming_response.rb', line 769

required :credits_applied, String

#end_dateTime

The end date of the range of time applied for this line item's price.

Parameters:

  • value (Time)

Returns:

  • (Time)


775
# File 'lib/orb/models/invoice_fetch_upcoming_response.rb', line 775

required :end_date, Time

#filterString?

An additional filter that was used to calculate the usage for this line item.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


781
# File 'lib/orb/models/invoice_fetch_upcoming_response.rb', line 781

required :filter, String, nil?: true

#groupingString?

[DEPRECATED] For configured prices that are split by a grouping key, this will be populated with the key and a value. The amount and subtotal will be the values for this particular grouping.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


789
# File 'lib/orb/models/invoice_fetch_upcoming_response.rb', line 789

required :grouping, String, nil?: true

#idString

A unique ID for this line item.

Parameters:

  • value (String)

Returns:

  • (String)


740
# File 'lib/orb/models/invoice_fetch_upcoming_response.rb', line 740

required :id, String

#nameString

The name of the price associated with this line item.

Parameters:

  • value (String)

Returns:

  • (String)


795
# File 'lib/orb/models/invoice_fetch_upcoming_response.rb', line 795

required :name, String

#partially_invoiced_amountString

Any amount applied from a partial invoice

Parameters:

  • value (String)

Returns:

  • (String)


801
# File 'lib/orb/models/invoice_fetch_upcoming_response.rb', line 801

required :partially_invoiced_amount, String

#priceOrb::Models::Price::Unit, ...

The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in the form of an invoice line item. Prices take a quantity and determine an amount to bill.

Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a given Price object. The model_type field determines the key for the configuration object that is present.

For more on the types of prices, see the core concepts documentation



816
# File 'lib/orb/models/invoice_fetch_upcoming_response.rb', line 816

required :price, union: -> { Orb::Price }

#quantityFloat

Either the fixed fee quantity or the usage during the service period.

Parameters:

  • value (Float)

Returns:

  • (Float)


822
# File 'lib/orb/models/invoice_fetch_upcoming_response.rb', line 822

required :quantity, Float

#start_dateTime

The start date of the range of time applied for this line item's price.

Parameters:

  • value (Time)

Returns:

  • (Time)


828
# File 'lib/orb/models/invoice_fetch_upcoming_response.rb', line 828

required :start_date, Time

#sub_line_itemsArray<Orb::Models::MatrixSubLineItem, Orb::Models::TierSubLineItem, Orb::Models::OtherSubLineItem>

For complex pricing structures, the line item can be broken down further in sub_line_items.

Parameters:

  • value (::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::sub_line_item])

Returns:



835
836
# File 'lib/orb/models/invoice_fetch_upcoming_response.rb', line 835

required :sub_line_items,
-> { Orb::Internal::Type::ArrayOf[union: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem] }

#subtotalString

The line amount before any adjustments.

Parameters:

  • value (String)

Returns:

  • (String)


842
# File 'lib/orb/models/invoice_fetch_upcoming_response.rb', line 842

required :subtotal, String

#tax_amountsArray<Orb::Models::TaxAmount>

An array of tax rates and their incurred tax amounts. Empty if no tax integration is configured.

Parameters:

Returns:



849
# File 'lib/orb/models/invoice_fetch_upcoming_response.rb', line 849

required :tax_amounts, -> { Orb::Internal::Type::ArrayOf[Orb::TaxAmount] }

#usage_customer_idsArray<String>?

A list of customer ids that were used to calculate the usage for this line item.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


855
# File 'lib/orb/models/invoice_fetch_upcoming_response.rb', line 855

required :usage_customer_ids, Orb::Internal::Type::ArrayOf[String], nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


488
# File 'sig/orb/models/invoice_fetch_upcoming_response.rbs', line 488

def to_hash: -> {