Class: Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/invoice_edited_webhook_event.rb,
sig/orb/models/invoice_edited_webhook_event.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::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::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



147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
# File 'lib/orb/models/invoice_edited_webhook_event.rb', line 147

class LineItem < Orb::Internal::Type::BaseModel
  # @!attribute id
  #   A unique ID for this line item.
  #
  #   @return [String]
  required :id, String

  # @!attribute adjusted_subtotal
  #   The line amount after any adjustments and before overage conversion, credits and
  #   partial invoicing.
  #
  #   @return [String]
  required :adjusted_subtotal, String

  # @!attribute adjustments
  #   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).
  #
  #   @return [Array<Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount, Orb::Models::MonetaryMinimumAdjustment, Orb::Models::MonetaryMaximumAdjustment>]
  required :adjustments,
           -> { Orb::Internal::Type::ArrayOf[union: Orb::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment] }

  # @!attribute amount
  #   The final amount for a line item after all adjustments and pre paid credits have
  #   been applied.
  #
  #   @return [String]
  required :amount, String

  # @!attribute credits_applied
  #   The number of prepaid credits applied.
  #
  #   @return [String]
  required :credits_applied, String

  # @!attribute end_date
  #   The end date of the range of time applied for this line item's price.
  #
  #   @return [Time]
  required :end_date, Time

  # @!attribute filter
  #   An additional filter that was used to calculate the usage for this line item.
  #
  #   @return [String, nil]
  required :filter, String, nil?: true

  # @!attribute grouping
  #   [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.
  #
  #   @return [String, nil]
  required :grouping, String, nil?: true

  # @!attribute name
  #   The name of the price associated with this line item.
  #
  #   @return [String]
  required :name, String

  # @!attribute partially_invoiced_amount
  #   Any amount applied from a partial invoice
  #
  #   @return [String]
  required :partially_invoiced_amount, String

  # @!attribute price
  #   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)
  #
  #   @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::GroupedTieredMatrix, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredMatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput]
  required :price, union: -> { Orb::Price }

  # @!attribute quantity
  #   Either the fixed fee quantity or the usage during the service period.
  #
  #   @return [Float]
  required :quantity, Float

  # @!attribute start_date
  #   The start date of the range of time applied for this line item's price.
  #
  #   @return [Time]
  required :start_date, Time

  # @!attribute sub_line_items
  #   For complex pricing structures, the line item can be broken down further in
  #   `sub_line_items`.
  #
  #   @return [Array<Orb::Models::MatrixSubLineItem, Orb::Models::TierSubLineItem, Orb::Models::OtherSubLineItem>]
  required :sub_line_items,
           -> { Orb::Internal::Type::ArrayOf[union: Orb::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::SubLineItem] }

  # @!attribute subtotal
  #   The line amount before any adjustments.
  #
  #   @return [String]
  required :subtotal, String

  # @!attribute tax_amounts
  #   An array of tax rates and their incurred tax amounts. Empty if no tax
  #   integration is configured.
  #
  #   @return [Array<Orb::Models::TaxAmount>]
  required :tax_amounts, -> { Orb::Internal::Type::ArrayOf[Orb::TaxAmount] }

  # @!attribute usage_customer_ids
  #   A list of customer ids that were used to calculate the usage for this line item.
  #
  #   @return [Array<String>, nil]
  required :usage_customer_ids, Orb::Internal::Type::ArrayOf[String], nil?: true

  # @!method initialize(id:, adjusted_subtotal:, adjustments:, amount:, credits_applied:, end_date:, filter:, grouping:, name:, partially_invoiced_amount:, price:, quantity:, start_date:, sub_line_items:, subtotal:, tax_amounts:, usage_customer_ids:)
  #   Some parameter documentations has been truncated, see
  #   {Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem}
  #   for more details.
  #
  #   @param id [String] A unique ID for this line item.
  #
  #   @param adjusted_subtotal [String] The line amount after any adjustments and before overage conversion, credits and
  #
  #   @param adjustments [Array<Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount, Orb::Models::MonetaryMinimumAdjustment, Orb::Models::MonetaryMaximumAdjustment>] All adjustments applied to the line item in the order they were applied based on
  #
  #   @param amount [String] The final amount for a line item after all adjustments and pre paid credits have
  #
  #   @param credits_applied [String] The number of prepaid credits applied.
  #
  #   @param end_date [Time] The end date of the range of time applied for this line item's price.
  #
  #   @param filter [String, nil] An additional filter that was used to calculate the usage for this line item.
  #
  #   @param grouping [String, nil] [DEPRECATED] For configured prices that are split by a grouping key, this will b
  #
  #   @param name [String] The name of the price associated with this line item.
  #
  #   @param partially_invoiced_amount [String] Any amount applied from a partial invoice
  #
  #   @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::GroupedTieredMatrix, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredMatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu
  #
  #   @param quantity [Float] Either the fixed fee quantity or the usage during the service period.
  #
  #   @param start_date [Time] The start date of the range of time applied for this line item's price.
  #
  #   @param 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
  #
  #   @param subtotal [String] The line amount before any adjustments.
  #
  #   @param tax_amounts [Array<Orb::Models::TaxAmount>] An array of tax rates and their incurred tax amounts. Empty if no tax integratio
  #
  #   @param usage_customer_ids [Array<String>, nil] A list of customer ids that were used to calculate the usage for this line item.

  module Adjustment
    extend Orb::Internal::Type::Union

    discriminator :adjustment_type

    variant :usage_discount, -> { Orb::MonetaryUsageDiscountAdjustment }

    variant :amount_discount, -> { Orb::MonetaryAmountDiscountAdjustment }

    variant :percentage_discount, -> { Orb::MonetaryPercentageDiscountAdjustment }

    variant :tiered_percentage_discount,
            -> { Orb::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount }

    variant :minimum, -> { Orb::MonetaryMinimumAdjustment }

    variant :maximum, -> { Orb::MonetaryMaximumAdjustment }

    class TieredPercentageDiscount < Orb::Internal::Type::BaseModel
      # @!attribute id
      #
      #   @return [String]
      required :id, String

      # @!attribute adjustment_type
      #
      #   @return [Symbol, :tiered_percentage_discount]
      required :adjustment_type, const: :tiered_percentage_discount

      # @!attribute amount
      #   The value applied by an adjustment.
      #
      #   @return [String]
      required :amount, String

      # @!attribute applies_to_price_ids
      #   @deprecated
      #
      #   The price IDs that this adjustment applies to.
      #
      #   @return [Array<String>]
      required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]

      # @!attribute filters
      #   The filters that determine which prices to apply this adjustment to.
      #
      #   @return [Array<Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter>]
      required :filters,
               -> do
                 Orb::Internal::Type::ArrayOf[
                   Orb::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter
                 ]
               end

      # @!attribute is_invoice_level
      #   True for adjustments that apply to an entire invoice, false for adjustments that
      #   apply to only one price.
      #
      #   @return [Boolean]
      required :is_invoice_level, Orb::Internal::Type::Boolean

      # @!attribute reason
      #   The reason for the adjustment.
      #
      #   @return [String, nil]
      required :reason, String, nil?: true

      # @!attribute replaces_adjustment_id
      #   The adjustment id this adjustment replaces. This adjustment will take the place
      #   of the replaced adjustment in plan version migrations.
      #
      #   @return [String, nil]
      required :replaces_adjustment_id, String, nil?: true

      # @!attribute tiers
      #   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.
      #
      #   @return [Array<Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Tier>]
      required :tiers,
               -> do
                 Orb::Internal::Type::ArrayOf[
                   Orb::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Tier
                 ]
               end

      # @!method initialize(id:, amount:, applies_to_price_ids:, filters:, is_invoice_level:, reason:, replaces_adjustment_id:, tiers:, adjustment_type: :tiered_percentage_discount)
      #   Some parameter documentations has been truncated, see
      #   {Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount}
      #   for more details.
      #
      #   @param id [String]
      #
      #   @param amount [String] The value applied by an adjustment.
      #
      #   @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
      #
      #   @param filters [Array<Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
      #
      #   @param is_invoice_level [Boolean] True for adjustments that apply to an entire invoice, false for adjustments that
      #
      #   @param reason [String, nil] The reason for the adjustment.
      #
      #   @param replaces_adjustment_id [String, nil] The adjustment id this adjustment replaces. This adjustment will take the place
      #
      #   @param tiers [Array<Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Tier>] The ordered, contiguous bands of cumulative eligible spend, each discounted at i
      #
      #   @param adjustment_type [Symbol, :tiered_percentage_discount]

      class Filter < Orb::Internal::Type::BaseModel
        # @!attribute field
        #   The property of the price to filter on.
        #
        #   @return [Symbol, Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field]
        required :field,
                 enum: -> { Orb::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field }

        # @!attribute operator
        #   Should prices that match the filter be included or excluded.
        #
        #   @return [Symbol, Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter::Operator]
        required :operator,
                 enum: -> { Orb::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter::Operator }

        # @!attribute values
        #   The IDs or values that match this filter.
        #
        #   @return [Array<String>]
        required :values, Orb::Internal::Type::ArrayOf[String]

        # @!method initialize(field:, operator:, values:)
        #   @param field [Symbol, Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field] The property of the price to filter on.
        #
        #   @param operator [Symbol, Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
        #
        #   @param values [Array<String>] The IDs or values that match this filter.

        # The property of the price to filter on.
        #
        # @see Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter#field
        module Field
          extend Orb::Internal::Type::Enum

          PRICE_ID = :price_id
          ITEM_ID = :item_id
          PRICE_TYPE = :price_type
          CURRENCY = :currency
          PRICING_UNIT_ID = :pricing_unit_id

          # @!method self.values
          #   @return [Array<Symbol>]
        end

        # Should prices that match the filter be included or excluded.
        #
        # @see Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter#operator
        module Operator
          extend Orb::Internal::Type::Enum

          INCLUDES = :includes
          EXCLUDES = :excludes

          # @!method self.values
          #   @return [Array<Symbol>]
        end
      end

      class Tier < Orb::Internal::Type::BaseModel
        # @!attribute lower_bound
        #   Exclusive lower bound of cumulative spend for this tier.
        #
        #   @return [Float]
        required :lower_bound, Float

        # @!attribute percentage
        #   The percentage (between 0 and 1) discounted from spend that falls within this
        #   tier.
        #
        #   @return [Float]
        required :percentage, Float

        # @!attribute upper_bound
        #   Inclusive upper bound of cumulative spend for this tier; null for the final
        #   open-ended tier.
        #
        #   @return [Float, nil]
        optional :upper_bound, Float, nil?: true

        # @!method initialize(lower_bound:, percentage:, upper_bound: nil)
        #   Some parameter documentations has been truncated, see
        #   {Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::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.
        #
        #   @param lower_bound [Float] Exclusive lower bound of cumulative spend for this tier.
        #
        #   @param percentage [Float] The percentage (between 0 and 1) discounted from spend that falls within this ti
        #
        #   @param upper_bound [Float, nil] Inclusive upper bound of cumulative spend for this tier; null for the final open
      end
    end

    # @!method self.variants
    #   @return [Array(Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount, Orb::Models::MonetaryMinimumAdjustment, Orb::Models::MonetaryMaximumAdjustment)]
  end

  module SubLineItem
    extend Orb::Internal::Type::Union

    discriminator :type

    variant :matrix, -> { Orb::MatrixSubLineItem }

    variant :tier, -> { Orb::TierSubLineItem }

    variant :"'null'", -> { Orb::OtherSubLineItem }

    # @!method self.variants
    #   @return [Array(Orb::Models::MatrixSubLineItem, Orb::Models::TierSubLineItem, Orb::Models::OtherSubLineItem)]
  end
end

Instance Attribute Details

#adjusted_subtotal ⇒ String

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

Parameters:

  • value (String)

Returns:

  • (String)


159
# File 'lib/orb/models/invoice_edited_webhook_event.rb', line 159

required :adjusted_subtotal, String

#adjustments ⇒ Array<Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::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).



167
168
# File 'lib/orb/models/invoice_edited_webhook_event.rb', line 167

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

#amount ⇒ String

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

Parameters:

  • value (String)

Returns:

  • (String)


175
# File 'lib/orb/models/invoice_edited_webhook_event.rb', line 175

required :amount, String

#credits_applied ⇒ String

The number of prepaid credits applied.

Parameters:

  • value (String)

Returns:

  • (String)


181
# File 'lib/orb/models/invoice_edited_webhook_event.rb', line 181

required :credits_applied, String

#end_date ⇒ Time

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

Parameters:

  • value (Time)

Returns:

  • (Time)


187
# File 'lib/orb/models/invoice_edited_webhook_event.rb', line 187

required :end_date, Time

#filter ⇒ String?

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

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

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.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


201
# File 'lib/orb/models/invoice_edited_webhook_event.rb', line 201

required :grouping, String, nil?: true

#id ⇒ String

A unique ID for this line item.

Parameters:

  • value (String)

Returns:

  • (String)


152
# File 'lib/orb/models/invoice_edited_webhook_event.rb', line 152

required :id, String

#name ⇒ String

The name of the price associated with this line item.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :name, String

#partially_invoiced_amount ⇒ String

Any amount applied from a partial invoice

Parameters:

  • value (String)

Returns:

  • (String)


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

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



228
# File 'lib/orb/models/invoice_edited_webhook_event.rb', line 228

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

#quantity ⇒ Float

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

Parameters:

  • value (Float)

Returns:

  • (Float)


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

required :quantity, Float

#start_date ⇒ Time

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

Parameters:

  • value (Time)

Returns:

  • (Time)


240
# File 'lib/orb/models/invoice_edited_webhook_event.rb', line 240

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.

Parameters:

  • value (::Array[Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::sub_line_item])

Returns:



247
248
# File 'lib/orb/models/invoice_edited_webhook_event.rb', line 247

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

#subtotal ⇒ String

The line amount before any adjustments.

Parameters:

  • value (String)

Returns:

  • (String)


254
# File 'lib/orb/models/invoice_edited_webhook_event.rb', line 254

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.

Parameters:

Returns:



261
# File 'lib/orb/models/invoice_edited_webhook_event.rb', line 261

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.

Parameters:

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

Returns:

  • (Array<String>, nil)


267
# File 'lib/orb/models/invoice_edited_webhook_event.rb', line 267

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

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


192
# File 'sig/orb/models/invoice_edited_webhook_event.rbs', line 192

def to_hash: -> {