Class: Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem
- Defined in:
- lib/orb/models/changed_subscription_resources.rb,
sig/orb/models/changed_subscription_resources.rbs
Defined Under Namespace
Modules: Adjustment, SubLineItem
Constant Summary collapse
- Orb =
Instance Attribute Summary collapse
-
#adjusted_subtotal ⇒ String
The line amount after any adjustments and before overage conversion, credits and partial invoicing.
-
#adjustments ⇒ Array<Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::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).
-
#amount ⇒ String
The final amount for a line item after all adjustments and pre paid credits have been applied.
-
#credits_applied ⇒ String
The number of prepaid credits applied.
-
#end_date ⇒ Time
The end date of the range of time applied for this line item's price.
-
#filter ⇒ String?
An additional filter that was used to calculate the usage for this line item.
-
#grouping ⇒ String?
[DEPRECATED] For configured prices that are split by a grouping key, this will be populated with the key and a value.
-
#id ⇒ String
A unique ID for this line item.
-
#name ⇒ String
The name of the price associated with this line item.
-
#partially_invoiced_amount ⇒ String
Any amount applied from a partial invoice.
-
#price ⇒ Orb::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.
-
#quantity ⇒ Float
Either the fixed fee quantity or the usage during the service period.
-
#start_date ⇒ Time
The start date of the range of time applied for this line item's price.
-
#sub_line_items ⇒ Array<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. -
#subtotal ⇒ String
The line amount before any adjustments.
-
#tax_amounts ⇒ Array<Orb::Models::TaxAmount>
An array of tax rates and their incurred tax amounts.
-
#usage_customer_ids ⇒ Array<String>?
A list of customer ids that were used to calculate the usage for this line item.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(lower_bound:, percentage:, upper_bound: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Adjustment::TieredPercentageDiscount::Tier for more details.
- #to_hash ⇒ {
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::ChangedSubscriptionResources::CreatedInvoice::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.
|
|
# File 'lib/orb/models/changed_subscription_resources.rb', line 1122
|
Instance Attribute Details
#adjusted_subtotal ⇒ String
The line amount after any adjustments and before overage conversion, credits and partial invoicing.
792 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 792 required :adjusted_subtotal, String |
#adjustments ⇒ Array<Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::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).
800 801 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 800 required :adjustments, -> { Orb::Internal::Type::ArrayOf[union: Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment] } |
#amount ⇒ String
The final amount for a line item after all adjustments and pre paid credits have been applied.
808 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 808 required :amount, String |
#credits_applied ⇒ String
The number of prepaid credits applied.
814 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 814 required :credits_applied, String |
#end_date ⇒ Time
The end date of the range of time applied for this line item's price.
820 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 820 required :end_date, Time |
#filter ⇒ String?
An additional filter that was used to calculate the usage for this line item.
826 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 826 required :filter, String, nil?: true |
#grouping ⇒ String?
[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.
834 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 834 required :grouping, String, nil?: true |
#id ⇒ String
A unique ID for this line item.
785 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 785 required :id, String |
#name ⇒ String
The name of the price associated with this line item.
840 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 840 required :name, String |
#partially_invoiced_amount ⇒ String
Any amount applied from a partial invoice
846 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 846 required :partially_invoiced_amount, String |
#price ⇒ Orb::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
861 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 861 required :price, union: -> { Orb::Price } |
#quantity ⇒ Float
Either the fixed fee quantity or the usage during the service period.
867 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 867 required :quantity, Float |
#start_date ⇒ Time
The start date of the range of time applied for this line item's price.
873 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 873 required :start_date, Time |
#sub_line_items ⇒ Array<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.
880 881 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 880 required :sub_line_items, -> { Orb::Internal::Type::ArrayOf[union: Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::SubLineItem] } |
#subtotal ⇒ String
The line amount before any adjustments.
887 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 887 required :subtotal, String |
#tax_amounts ⇒ Array<Orb::Models::TaxAmount>
An array of tax rates and their incurred tax amounts. Empty if no tax integration is configured.
894 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 894 required :tax_amounts, -> { Orb::Internal::Type::ArrayOf[Orb::TaxAmount] } |
#usage_customer_ids ⇒ Array<String>?
A list of customer ids that were used to calculate the usage for this line item.
900 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 900 required :usage_customer_ids, Orb::Internal::Type::ArrayOf[String], nil?: true |
Class Method Details
.variants ⇒ Array(Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount, Orb::Models::MonetaryMinimumAdjustment, Orb::Models::MonetaryMaximumAdjustment)
|
|
# File 'lib/orb/models/changed_subscription_resources.rb', line 1140
|
Instance Method Details
#to_hash ⇒ {
524 |
# File 'sig/orb/models/changed_subscription_resources.rbs', line 524
def to_hash: -> {
|