Class: Orb::Models::Invoice::LineItem

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/invoice.rb

Defined Under Namespace

Modules: Adjustment, SubLineItem

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Internal::Type::BaseModel

#==, ==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, #initialize, 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

This class inherits a constructor from Orb::Internal::Type::BaseModel

Instance Attribute Details

#adjusted_subtotalString

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



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

required :adjusted_subtotal, String

#adjustmentsArray<Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, 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).



748
# File 'lib/orb/models/invoice.rb', line 748

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

#amountString

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



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

required :amount, String

#credits_appliedString

The number of prepaid credits applied.



761
# File 'lib/orb/models/invoice.rb', line 761

required :credits_applied, String

#discountOrb::Models::PercentageDiscount, ...

Deprecated.

This field is deprecated in favor of ‘adjustments`



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

required :discount, union: -> { Orb::Discount }, nil?: true

#end_dateTime

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



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

required :end_date, Time

#filterString?

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



781
# File 'lib/orb/models/invoice.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.



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

required :grouping, String, nil?: true

#idString

A unique ID for this line item.



733
# File 'lib/orb/models/invoice.rb', line 733

required :id, String

#maximumOrb::Models::Maximum?

Deprecated.

This field is deprecated in favor of ‘adjustments`.



797
# File 'lib/orb/models/invoice.rb', line 797

required :maximum, -> { Orb::Maximum }, nil?: true

#maximum_amountString?

Deprecated.

This field is deprecated in favor of ‘adjustments`.



805
# File 'lib/orb/models/invoice.rb', line 805

required :maximum_amount, String, nil?: true

#minimumOrb::Models::Minimum?

Deprecated.

This field is deprecated in favor of ‘adjustments`.



813
# File 'lib/orb/models/invoice.rb', line 813

required :minimum, -> { Orb::Minimum }, nil?: true

#minimum_amountString?

Deprecated.

This field is deprecated in favor of ‘adjustments`.



821
# File 'lib/orb/models/invoice.rb', line 821

required :minimum_amount, String, nil?: true

#nameString

The name of the price associated with this line item.



827
# File 'lib/orb/models/invoice.rb', line 827

required :name, String

#partially_invoiced_amountString

Any amount applied from a partial invoice



833
# File 'lib/orb/models/invoice.rb', line 833

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](/core-concepts#plan-and-price)



848
# File 'lib/orb/models/invoice.rb', line 848

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

#quantityFloat

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



854
# File 'lib/orb/models/invoice.rb', line 854

required :quantity, Float

#start_dateTime

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



860
# File 'lib/orb/models/invoice.rb', line 860

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`.



867
# File 'lib/orb/models/invoice.rb', line 867

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

#subtotalString

The line amount before before any adjustments.



873
# File 'lib/orb/models/invoice.rb', line 873

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.



880
# File 'lib/orb/models/invoice.rb', line 880

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.



886
# File 'lib/orb/models/invoice.rb', line 886

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

Class Method Details

.variantsArray(Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::MonetaryMinimumAdjustment, Orb::Models::MonetaryMaximumAdjustment)



# File 'lib/orb/models/invoice.rb', line 951