orb-billing 1.32.0 → 1.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 474c5f8856abcdfd5bb60bb6189ff6df0c37d53904af22c15217c13345be0981
4
- data.tar.gz: b7e0e71a2d5f327cd97ff719dbeb8abdc5865fb302527df8aa7e74c59629b861
3
+ metadata.gz: d22f2113a4acbd1c6f8d94504b3c2e5b751636c2e24cd2c7bdc25897e3d6dd8b
4
+ data.tar.gz: 4b5092fb788b3bd1b064c20fe160a92bccf05e2394b1af40b715df5db403a27f
5
5
  SHA512:
6
- metadata.gz: d2c18d18236ba5ef13d5b57a1a7019188b78c163655b7088be529a5a4e7e930346fc51446e758b789d12f962893c2632a6367d1530177eff8a370e02dcf16e7b
7
- data.tar.gz: '08bd0e25966042f967884e2e2f0b90a00ae6efc8758823d9768f3db1bef4c629d9e59b072d78c8743a1c496804b9a4789665ca9aba251c0bb715c1f8e1dd8772'
6
+ metadata.gz: 322da3b2af920d12a3967a9599f3c2b1a104e25497a66d42175e2387f6879edbe7e8338a5cecd098a009c5347046f6de5863a161f049e67ab31b78cb965d1573
7
+ data.tar.gz: 8a7db721c8affc90f7c0b32113ab96118dc139005bba72b2a8ee03b6944aff99413f8b9e296b96f911c21097e4597143a43ae1da4dafb048dea667d0a896df20
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.34.0](https://github.com/orbcorp/orb-ruby/compare/v1.33.0...v1.34.0) (2026-09-13)
4
+
5
+
6
+ ### Features
7
+
8
+ * **api:** add `include_zero_quantity_line_items` param and `hidden_line_item_count` to invoice endpoints ([69e2aaa](https://github.com/orbcorp/orb-ruby/commit/69e2aaa6d1b8227f7342735077c25cbcca72804e))
9
+
10
+ ## [1.33.0](https://github.com/orbcorp/orb-ruby/compare/v1.32.0...v1.33.0) (2026-09-12)
11
+
12
+
13
+ ### Features
14
+
15
+ * **api:** remove deprecated debug parameter and response details from ingestion ([ab3504d](https://github.com/orbcorp/orb-ruby/commit/ab3504dea69e04f8e83747110b8b962b11dec833))
16
+
3
17
  ## [1.32.0](https://github.com/orbcorp/orb-ruby/compare/v1.31.0...v1.32.0) (2026-09-10)
4
18
 
5
19
 
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "orb-billing", "~> 1.32.0"
18
+ gem "orb-billing", "~> 1.34.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -275,6 +275,15 @@ module Orb
275
275
  # @return [Time, nil]
276
276
  required :eligible_to_issue_at, Time, nil?: true
277
277
 
278
+ # @!attribute hidden_line_item_count
279
+ # The number of line items omitted from `line_items` because they have zero
280
+ # quantity. Amounts such as `subtotal` and `total` are computed over every line
281
+ # item on the invoice, including the omitted ones. In rare circumstances, hidden
282
+ # line items may still contribute to these amounts.
283
+ #
284
+ # @return [Integer]
285
+ required :hidden_line_item_count, Integer
286
+
278
287
  # @!attribute hosted_invoice_url
279
288
  # A URL for the customer-facing invoice portal. This URL expires 60 days after the
280
289
  # link is generated, or 30 days after the invoice's due date — whichever is later.
@@ -454,7 +463,7 @@ module Orb
454
463
  # @return [Boolean]
455
464
  required :will_auto_issue, Orb::Internal::Type::Boolean
456
465
 
457
- # @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, discount:, discounts:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, is_payable_now:, issue_failed_at:, issued_at:, line_items:, maximum:, maximum_amount:, memo:, metadata:, minimum:, minimum_amount:, paid_at:, payment_attempts:, payment_failed_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, subtotal:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
466
+ # @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, discount:, discounts:, due_date:, eligible_to_issue_at:, hidden_line_item_count:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, is_payable_now:, issue_failed_at:, issued_at:, line_items:, maximum:, maximum_amount:, memo:, metadata:, minimum:, minimum_amount:, paid_at:, payment_attempts:, payment_failed_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, subtotal:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
458
467
  # Some parameter documentations has been truncated, see
459
468
  # {Orb::Models::ChangedSubscriptionResources::CreatedInvoice} for more details.
460
469
  #
@@ -486,6 +495,8 @@ module Orb
486
495
  #
487
496
  # @param eligible_to_issue_at [Time, nil] If the invoice has a status of `draft`, this will be the time that the invoice w
488
497
  #
498
+ # @param hidden_line_item_count [Integer] The number of line items omitted from `line_items` because they have zero quanti
499
+ #
489
500
  # @param hosted_invoice_url [String, nil] A URL for the customer-facing invoice portal. This URL expires 60 days after the
490
501
  #
491
502
  # @param invoice_date [Time] The scheduled date of the invoice
@@ -239,6 +239,15 @@ module Orb
239
239
  # @return [Time, nil]
240
240
  required :eligible_to_issue_at, Time, nil?: true
241
241
 
242
+ # @!attribute hidden_line_item_count
243
+ # The number of line items omitted from `line_items` because they have zero
244
+ # quantity. Amounts such as `subtotal` and `total` are computed over every line
245
+ # item on the invoice, including the omitted ones. In rare circumstances, hidden
246
+ # line items may still contribute to these amounts.
247
+ #
248
+ # @return [Integer]
249
+ required :hidden_line_item_count, Integer
250
+
242
251
  # @!attribute hosted_invoice_url
243
252
  # A URL for the customer-facing invoice portal. This URL expires 60 days after the
244
253
  # link is generated, or 30 days after the invoice's due date — whichever is later.
@@ -410,7 +419,7 @@ module Orb
410
419
  # @return [Boolean]
411
420
  required :will_auto_issue, Orb::Internal::Type::Boolean
412
421
 
413
- # @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, discount:, discounts:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, line_items:, maximum:, maximum_amount:, memo:, metadata:, minimum:, minimum_amount:, paid_at:, payment_attempts:, payment_failed_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, subtotal:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
422
+ # @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, discount:, discounts:, due_date:, eligible_to_issue_at:, hidden_line_item_count:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, line_items:, maximum:, maximum_amount:, memo:, metadata:, minimum:, minimum_amount:, paid_at:, payment_attempts:, payment_failed_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, subtotal:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
414
423
  # Some parameter documentations has been truncated, see {Orb::Models::Invoice} for
415
424
  # more details.
416
425
  #
@@ -448,6 +457,8 @@ module Orb
448
457
  #
449
458
  # @param eligible_to_issue_at [Time, nil] If the invoice has a status of `draft`, this will be the time that the invoice w
450
459
  #
460
+ # @param hidden_line_item_count [Integer] The number of line items omitted from `line_items` because they have zero quanti
461
+ #
451
462
  # @param hosted_invoice_url [String, nil] A URL for the customer-facing invoice portal. This URL expires 60 days after the
452
463
  #
453
464
  # @param invoice_date [Time] The scheduled date of the invoice
@@ -12,8 +12,22 @@ module Orb
12
12
  # @return [String]
13
13
  required :invoice_id, String
14
14
 
15
- # @!method initialize(invoice_id:, request_options: {})
15
+ # @!attribute include_zero_quantity_line_items
16
+ # Whether to return line items with a quantity of zero. When omitted, Orb returns
17
+ # every line item. A line item that is grouped as part of a line item minimum is
18
+ # always returned; an invoice-level minimum does not exempt it.
19
+ #
20
+ # @return [Boolean, nil]
21
+ optional :include_zero_quantity_line_items, Orb::Internal::Type::Boolean, nil?: true
22
+
23
+ # @!method initialize(invoice_id:, include_zero_quantity_line_items: nil, request_options: {})
24
+ # Some parameter documentations has been truncated, see
25
+ # {Orb::Models::InvoiceFetchParams} for more details.
26
+ #
16
27
  # @param invoice_id [String]
28
+ #
29
+ # @param include_zero_quantity_line_items [Boolean, nil] Whether to return line items with a quantity of zero. When omitted, Orb returns
30
+ #
17
31
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
18
32
  end
19
33
  end
@@ -12,8 +12,22 @@ module Orb
12
12
  # @return [String]
13
13
  required :subscription_id, String
14
14
 
15
- # @!method initialize(subscription_id:, request_options: {})
15
+ # @!attribute include_zero_quantity_line_items
16
+ # Whether to return line items with a quantity of zero. When omitted, Orb returns
17
+ # every line item. A line item that is grouped as part of a line item minimum is
18
+ # always returned; an invoice-level minimum does not exempt it.
19
+ #
20
+ # @return [Boolean, nil]
21
+ optional :include_zero_quantity_line_items, Orb::Internal::Type::Boolean, nil?: true
22
+
23
+ # @!method initialize(subscription_id:, include_zero_quantity_line_items: nil, request_options: {})
24
+ # Some parameter documentations has been truncated, see
25
+ # {Orb::Models::InvoiceFetchUpcomingParams} for more details.
26
+ #
16
27
  # @param subscription_id [String]
28
+ #
29
+ # @param include_zero_quantity_line_items [Boolean, nil] Whether to return line items with a quantity of zero. When omitted, Orb returns
30
+ #
17
31
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
18
32
  end
19
33
  end
@@ -241,6 +241,15 @@ module Orb
241
241
  # @return [Time, nil]
242
242
  required :eligible_to_issue_at, Time, nil?: true
243
243
 
244
+ # @!attribute hidden_line_item_count
245
+ # The number of line items omitted from `line_items` because they have zero
246
+ # quantity. Amounts such as `subtotal` and `total` are computed over every line
247
+ # item on the invoice, including the omitted ones. In rare circumstances, hidden
248
+ # line items may still contribute to these amounts.
249
+ #
250
+ # @return [Integer]
251
+ required :hidden_line_item_count, Integer
252
+
244
253
  # @!attribute hosted_invoice_url
245
254
  # A URL for the customer-facing invoice portal. This URL expires 60 days after the
246
255
  # link is generated, or 30 days after the invoice's due date — whichever is later.
@@ -414,7 +423,7 @@ module Orb
414
423
  # @return [Boolean]
415
424
  required :will_auto_issue, Orb::Internal::Type::Boolean
416
425
 
417
- # @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, discount:, discounts:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, line_items:, maximum:, maximum_amount:, memo:, metadata:, minimum:, minimum_amount:, paid_at:, payment_attempts:, payment_failed_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, subtotal:, sync_failed_at:, target_date:, total:, voided_at:, will_auto_issue:)
426
+ # @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, discount:, discounts:, due_date:, eligible_to_issue_at:, hidden_line_item_count:, hosted_invoice_url:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, line_items:, maximum:, maximum_amount:, memo:, metadata:, minimum:, minimum_amount:, paid_at:, payment_attempts:, payment_failed_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, subtotal:, sync_failed_at:, target_date:, total:, voided_at:, will_auto_issue:)
418
427
  # Some parameter documentations has been truncated, see
419
428
  # {Orb::Models::InvoiceFetchUpcomingResponse} for more details.
420
429
  #
@@ -446,6 +455,8 @@ module Orb
446
455
  #
447
456
  # @param eligible_to_issue_at [Time, nil] If the invoice has a status of `draft`, this will be the time that the invoice w
448
457
  #
458
+ # @param hidden_line_item_count [Integer] The number of line items omitted from `line_items` because they have zero quanti
459
+ #
449
460
  # @param hosted_invoice_url [String, nil] A URL for the customer-facing invoice portal. This URL expires 60 days after the
450
461
  #
451
462
  # @param invoice_number [String] Automatically generated invoice number to help track and reconcile invoices. Inv
@@ -68,6 +68,14 @@ module Orb
68
68
  # @return [String, nil]
69
69
  optional :external_customer_id, String, nil?: true
70
70
 
71
+ # @!attribute include_zero_quantity_line_items
72
+ # Whether to return line items with a quantity of zero. When omitted, Orb returns
73
+ # every line item. A line item that is grouped as part of a line item minimum is
74
+ # always returned; an invoice-level minimum does not exempt it.
75
+ #
76
+ # @return [Boolean, nil]
77
+ optional :include_zero_quantity_line_items, Orb::Internal::Type::Boolean, nil?: true
78
+
71
79
  # @!attribute invoice_date_gt
72
80
  #
73
81
  # @return [Time, nil]
@@ -109,7 +117,7 @@ module Orb
109
117
  # @return [String, nil]
110
118
  optional :subscription_id, String, nil?: true
111
119
 
112
- # @!method initialize(amount: nil, amount_gt: nil, amount_lt: nil, cursor: nil, customer_id: nil, date_type: nil, due_date: nil, due_date_window: nil, due_date_gt: nil, due_date_lt: nil, external_customer_id: nil, invoice_date_gt: nil, invoice_date_gte: nil, invoice_date_lt: nil, invoice_date_lte: nil, is_recurring: nil, limit: nil, status: nil, subscription_id: nil, request_options: {})
120
+ # @!method initialize(amount: nil, amount_gt: nil, amount_lt: nil, cursor: nil, customer_id: nil, date_type: nil, due_date: nil, due_date_window: nil, due_date_gt: nil, due_date_lt: nil, external_customer_id: nil, include_zero_quantity_line_items: nil, invoice_date_gt: nil, invoice_date_gte: nil, invoice_date_lt: nil, invoice_date_lte: nil, is_recurring: nil, limit: nil, status: nil, subscription_id: nil, request_options: {})
113
121
  # Some parameter documentations has been truncated, see
114
122
  # {Orb::Models::InvoiceListParams} for more details.
115
123
  #
@@ -135,6 +143,8 @@ module Orb
135
143
  #
136
144
  # @param external_customer_id [String, nil]
137
145
  #
146
+ # @param include_zero_quantity_line_items [Boolean, nil] Whether to return line items with a quantity of zero. When omitted, Orb returns
147
+ #
138
148
  # @param invoice_date_gt [Time, nil]
139
149
  #
140
150
  # @param invoice_date_gte [Time, nil]
@@ -112,7 +112,7 @@ module Orb
112
112
  # the [list invoices summary](/api-reference/invoice/list-invoices-summary)
113
113
  # endpoint for better performance.
114
114
  #
115
- # @overload list(amount: nil, amount_gt: nil, amount_lt: nil, cursor: nil, customer_id: nil, date_type: nil, due_date: nil, due_date_window: nil, due_date_gt: nil, due_date_lt: nil, external_customer_id: nil, invoice_date_gt: nil, invoice_date_gte: nil, invoice_date_lt: nil, invoice_date_lte: nil, is_recurring: nil, limit: nil, status: nil, subscription_id: nil, request_options: {})
115
+ # @overload list(amount: nil, amount_gt: nil, amount_lt: nil, cursor: nil, customer_id: nil, date_type: nil, due_date: nil, due_date_window: nil, due_date_gt: nil, due_date_lt: nil, external_customer_id: nil, include_zero_quantity_line_items: nil, invoice_date_gt: nil, invoice_date_gte: nil, invoice_date_lt: nil, invoice_date_lte: nil, is_recurring: nil, limit: nil, status: nil, subscription_id: nil, request_options: {})
116
116
  #
117
117
  # @param amount [String, nil]
118
118
  #
@@ -136,6 +136,8 @@ module Orb
136
136
  #
137
137
  # @param external_customer_id [String, nil]
138
138
  #
139
+ # @param include_zero_quantity_line_items [Boolean, nil] Whether to return line items with a quantity of zero. When omitted, Orb returns
140
+ #
139
141
  # @param invoice_date_gt [Time, nil]
140
142
  #
141
143
  # @param invoice_date_gte [Time, nil]
@@ -208,33 +210,48 @@ module Orb
208
210
  )
209
211
  end
210
212
 
213
+ # Some parameter documentations has been truncated, see
214
+ # {Orb::Models::InvoiceFetchParams} for more details.
215
+ #
211
216
  # This endpoint is used to fetch an [`Invoice`](/core-concepts#invoice) given an
212
217
  # identifier.
213
218
  #
214
- # @overload fetch(invoice_id, request_options: {})
219
+ # @overload fetch(invoice_id, include_zero_quantity_line_items: nil, request_options: {})
215
220
  #
216
221
  # @param invoice_id [String]
222
+ #
223
+ # @param include_zero_quantity_line_items [Boolean, nil] Whether to return line items with a quantity of zero. When omitted, Orb returns
224
+ #
217
225
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
218
226
  #
219
227
  # @return [Orb::Models::Invoice]
220
228
  #
221
229
  # @see Orb::Models::InvoiceFetchParams
222
230
  def fetch(invoice_id, params = {})
231
+ parsed, options = Orb::InvoiceFetchParams.dump_request(params)
232
+ query = Orb::Internal::Util.encode_query_params(parsed)
223
233
  @client.request(
224
234
  method: :get,
225
235
  path: ["invoices/%1$s", invoice_id],
236
+ query: query,
226
237
  model: Orb::Invoice,
227
- options: params[:request_options]
238
+ options: options
228
239
  )
229
240
  end
230
241
 
242
+ # Some parameter documentations has been truncated, see
243
+ # {Orb::Models::InvoiceFetchUpcomingParams} for more details.
244
+ #
231
245
  # This endpoint can be used to fetch the upcoming
232
246
  # [invoice](/core-concepts#invoice) for the current billing period given a
233
247
  # subscription.
234
248
  #
235
- # @overload fetch_upcoming(subscription_id:, request_options: {})
249
+ # @overload fetch_upcoming(subscription_id:, include_zero_quantity_line_items: nil, request_options: {})
236
250
  #
237
251
  # @param subscription_id [String]
252
+ #
253
+ # @param include_zero_quantity_line_items [Boolean, nil] Whether to return line items with a quantity of zero. When omitted, Orb returns
254
+ #
238
255
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
239
256
  #
240
257
  # @return [Orb::Models::InvoiceFetchUpcomingResponse]
data/lib/orb/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Orb
4
- VERSION = "1.32.0"
4
+ VERSION = "1.34.0"
5
5
  end
@@ -310,6 +310,13 @@ module Orb
310
310
  sig { returns(T.nilable(Time)) }
311
311
  attr_accessor :eligible_to_issue_at
312
312
 
313
+ # The number of line items omitted from `line_items` because they have zero
314
+ # quantity. Amounts such as `subtotal` and `total` are computed over every line
315
+ # item on the invoice, including the omitted ones. In rare circumstances, hidden
316
+ # line items may still contribute to these amounts.
317
+ sig { returns(Integer) }
318
+ attr_accessor :hidden_line_item_count
319
+
313
320
  # A URL for the customer-facing invoice portal. This URL expires 60 days after the
314
321
  # link is generated, or 30 days after the invoice's due date — whichever is later.
315
322
  sig { returns(T.nilable(String)) }
@@ -498,6 +505,7 @@ module Orb
498
505
  ],
499
506
  due_date: T.nilable(Time),
500
507
  eligible_to_issue_at: T.nilable(Time),
508
+ hidden_line_item_count: Integer,
501
509
  hosted_invoice_url: T.nilable(String),
502
510
  invoice_date: Time,
503
511
  invoice_number: String,
@@ -714,6 +722,11 @@ module Orb
714
722
  # will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is
715
723
  # true, the invoice will automatically begin issuing at this time.
716
724
  eligible_to_issue_at:,
725
+ # The number of line items omitted from `line_items` because they have zero
726
+ # quantity. Amounts such as `subtotal` and `total` are computed over every line
727
+ # item on the invoice, including the omitted ones. In rare circumstances, hidden
728
+ # line items may still contribute to these amounts.
729
+ hidden_line_item_count:,
717
730
  # A URL for the customer-facing invoice portal. This URL expires 60 days after the
718
731
  # link is generated, or 30 days after the invoice's due date — whichever is later.
719
732
  hosted_invoice_url:,
@@ -806,6 +819,7 @@ module Orb
806
819
  discounts: T::Array[Orb::InvoiceLevelDiscount::Variants],
807
820
  due_date: T.nilable(Time),
808
821
  eligible_to_issue_at: T.nilable(Time),
822
+ hidden_line_item_count: Integer,
809
823
  hosted_invoice_url: T.nilable(String),
810
824
  invoice_date: Time,
811
825
  invoice_number: String,
@@ -224,6 +224,13 @@ module Orb
224
224
  sig { returns(T.nilable(Time)) }
225
225
  attr_accessor :eligible_to_issue_at
226
226
 
227
+ # The number of line items omitted from `line_items` because they have zero
228
+ # quantity. Amounts such as `subtotal` and `total` are computed over every line
229
+ # item on the invoice, including the omitted ones. In rare circumstances, hidden
230
+ # line items may still contribute to these amounts.
231
+ sig { returns(Integer) }
232
+ attr_accessor :hidden_line_item_count
233
+
227
234
  # A URL for the customer-facing invoice portal. This URL expires 60 days after the
228
235
  # link is generated, or 30 days after the invoice's due date — whichever is later.
229
236
  sig { returns(T.nilable(String)) }
@@ -385,6 +392,7 @@ module Orb
385
392
  ],
386
393
  due_date: T.nilable(Time),
387
394
  eligible_to_issue_at: T.nilable(Time),
395
+ hidden_line_item_count: Integer,
388
396
  hosted_invoice_url: T.nilable(String),
389
397
  invoice_date: Time,
390
398
  invoice_number: String,
@@ -592,6 +600,11 @@ module Orb
592
600
  # will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is
593
601
  # true, the invoice will automatically begin issuing at this time.
594
602
  eligible_to_issue_at:,
603
+ # The number of line items omitted from `line_items` because they have zero
604
+ # quantity. Amounts such as `subtotal` and `total` are computed over every line
605
+ # item on the invoice, including the omitted ones. In rare circumstances, hidden
606
+ # line items may still contribute to these amounts.
607
+ hidden_line_item_count:,
595
608
  # A URL for the customer-facing invoice portal. This URL expires 60 days after the
596
609
  # link is generated, or 30 days after the invoice's due date — whichever is later.
597
610
  hosted_invoice_url:,
@@ -676,6 +689,7 @@ module Orb
676
689
  discounts: T::Array[Orb::InvoiceLevelDiscount::Variants],
677
690
  due_date: T.nilable(Time),
678
691
  eligible_to_issue_at: T.nilable(Time),
692
+ hidden_line_item_count: Integer,
679
693
  hosted_invoice_url: T.nilable(String),
680
694
  invoice_date: Time,
681
695
  invoice_number: String,
@@ -12,18 +12,36 @@ module Orb
12
12
  sig { returns(String) }
13
13
  attr_accessor :invoice_id
14
14
 
15
+ # Whether to return line items with a quantity of zero. When omitted, Orb returns
16
+ # every line item. A line item that is grouped as part of a line item minimum is
17
+ # always returned; an invoice-level minimum does not exempt it.
18
+ sig { returns(T.nilable(T::Boolean)) }
19
+ attr_accessor :include_zero_quantity_line_items
20
+
15
21
  sig do
16
22
  params(
17
23
  invoice_id: String,
24
+ include_zero_quantity_line_items: T.nilable(T::Boolean),
18
25
  request_options: Orb::RequestOptions::OrHash
19
26
  ).returns(T.attached_class)
20
27
  end
21
- def self.new(invoice_id:, request_options: {})
28
+ def self.new(
29
+ invoice_id:,
30
+ # Whether to return line items with a quantity of zero. When omitted, Orb returns
31
+ # every line item. A line item that is grouped as part of a line item minimum is
32
+ # always returned; an invoice-level minimum does not exempt it.
33
+ include_zero_quantity_line_items: nil,
34
+ request_options: {}
35
+ )
22
36
  end
23
37
 
24
38
  sig do
25
39
  override.returns(
26
- { invoice_id: String, request_options: Orb::RequestOptions }
40
+ {
41
+ invoice_id: String,
42
+ include_zero_quantity_line_items: T.nilable(T::Boolean),
43
+ request_options: Orb::RequestOptions
44
+ }
27
45
  )
28
46
  end
29
47
  def to_hash
@@ -14,18 +14,36 @@ module Orb
14
14
  sig { returns(String) }
15
15
  attr_accessor :subscription_id
16
16
 
17
+ # Whether to return line items with a quantity of zero. When omitted, Orb returns
18
+ # every line item. A line item that is grouped as part of a line item minimum is
19
+ # always returned; an invoice-level minimum does not exempt it.
20
+ sig { returns(T.nilable(T::Boolean)) }
21
+ attr_accessor :include_zero_quantity_line_items
22
+
17
23
  sig do
18
24
  params(
19
25
  subscription_id: String,
26
+ include_zero_quantity_line_items: T.nilable(T::Boolean),
20
27
  request_options: Orb::RequestOptions::OrHash
21
28
  ).returns(T.attached_class)
22
29
  end
23
- def self.new(subscription_id:, request_options: {})
30
+ def self.new(
31
+ subscription_id:,
32
+ # Whether to return line items with a quantity of zero. When omitted, Orb returns
33
+ # every line item. A line item that is grouped as part of a line item minimum is
34
+ # always returned; an invoice-level minimum does not exempt it.
35
+ include_zero_quantity_line_items: nil,
36
+ request_options: {}
37
+ )
24
38
  end
25
39
 
26
40
  sig do
27
41
  override.returns(
28
- { subscription_id: String, request_options: Orb::RequestOptions }
42
+ {
43
+ subscription_id: String,
44
+ include_zero_quantity_line_items: T.nilable(T::Boolean),
45
+ request_options: Orb::RequestOptions
46
+ }
29
47
  )
30
48
  end
31
49
  def to_hash
@@ -243,6 +243,13 @@ module Orb
243
243
  sig { returns(T.nilable(Time)) }
244
244
  attr_accessor :eligible_to_issue_at
245
245
 
246
+ # The number of line items omitted from `line_items` because they have zero
247
+ # quantity. Amounts such as `subtotal` and `total` are computed over every line
248
+ # item on the invoice, including the omitted ones. In rare circumstances, hidden
249
+ # line items may still contribute to these amounts.
250
+ sig { returns(Integer) }
251
+ attr_accessor :hidden_line_item_count
252
+
246
253
  # A URL for the customer-facing invoice portal. This URL expires 60 days after the
247
254
  # link is generated, or 30 days after the invoice's due date — whichever is later.
248
255
  sig { returns(T.nilable(String)) }
@@ -417,6 +424,7 @@ module Orb
417
424
  ],
418
425
  due_date: T.nilable(Time),
419
426
  eligible_to_issue_at: T.nilable(Time),
427
+ hidden_line_item_count: Integer,
420
428
  hosted_invoice_url: T.nilable(String),
421
429
  invoice_number: String,
422
430
  invoice_pdf: T.nilable(String),
@@ -631,6 +639,11 @@ module Orb
631
639
  # will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is
632
640
  # true, the invoice will automatically begin issuing at this time.
633
641
  eligible_to_issue_at:,
642
+ # The number of line items omitted from `line_items` because they have zero
643
+ # quantity. Amounts such as `subtotal` and `total` are computed over every line
644
+ # item on the invoice, including the omitted ones. In rare circumstances, hidden
645
+ # line items may still contribute to these amounts.
646
+ hidden_line_item_count:,
634
647
  # A URL for the customer-facing invoice portal. This URL expires 60 days after the
635
648
  # link is generated, or 30 days after the invoice's due date — whichever is later.
636
649
  hosted_invoice_url:,
@@ -719,6 +732,7 @@ module Orb
719
732
  discounts: T::Array[Orb::InvoiceLevelDiscount::Variants],
720
733
  due_date: T.nilable(Time),
721
734
  eligible_to_issue_at: T.nilable(Time),
735
+ hidden_line_item_count: Integer,
722
736
  hosted_invoice_url: T.nilable(String),
723
737
  invoice_number: String,
724
738
  invoice_pdf: T.nilable(String),
@@ -48,6 +48,12 @@ module Orb
48
48
  sig { returns(T.nilable(String)) }
49
49
  attr_accessor :external_customer_id
50
50
 
51
+ # Whether to return line items with a quantity of zero. When omitted, Orb returns
52
+ # every line item. A line item that is grouped as part of a line item minimum is
53
+ # always returned; an invoice-level minimum does not exempt it.
54
+ sig { returns(T.nilable(T::Boolean)) }
55
+ attr_accessor :include_zero_quantity_line_items
56
+
51
57
  sig { returns(T.nilable(Time)) }
52
58
  attr_accessor :invoice_date_gt
53
59
 
@@ -91,6 +97,7 @@ module Orb
91
97
  due_date_gt: T.nilable(Date),
92
98
  due_date_lt: T.nilable(Date),
93
99
  external_customer_id: T.nilable(String),
100
+ include_zero_quantity_line_items: T.nilable(T::Boolean),
94
101
  invoice_date_gt: T.nilable(Time),
95
102
  invoice_date_gte: T.nilable(Time),
96
103
  invoice_date_lt: T.nilable(Time),
@@ -120,6 +127,10 @@ module Orb
120
127
  due_date_gt: nil,
121
128
  due_date_lt: nil,
122
129
  external_customer_id: nil,
130
+ # Whether to return line items with a quantity of zero. When omitted, Orb returns
131
+ # every line item. A line item that is grouped as part of a line item minimum is
132
+ # always returned; an invoice-level minimum does not exempt it.
133
+ include_zero_quantity_line_items: nil,
123
134
  invoice_date_gt: nil,
124
135
  invoice_date_gte: nil,
125
136
  invoice_date_lt: nil,
@@ -147,6 +158,7 @@ module Orb
147
158
  due_date_gt: T.nilable(Date),
148
159
  due_date_lt: T.nilable(Date),
149
160
  external_customer_id: T.nilable(String),
161
+ include_zero_quantity_line_items: T.nilable(T::Boolean),
150
162
  invoice_date_gt: T.nilable(Time),
151
163
  invoice_date_gte: T.nilable(Time),
152
164
  invoice_date_lt: T.nilable(Time),
@@ -156,6 +156,7 @@ module Orb
156
156
  due_date_gt: T.nilable(Date),
157
157
  due_date_lt: T.nilable(Date),
158
158
  external_customer_id: T.nilable(String),
159
+ include_zero_quantity_line_items: T.nilable(T::Boolean),
159
160
  invoice_date_gt: T.nilable(Time),
160
161
  invoice_date_gte: T.nilable(Time),
161
162
  invoice_date_lt: T.nilable(Time),
@@ -185,6 +186,10 @@ module Orb
185
186
  due_date_gt: nil,
186
187
  due_date_lt: nil,
187
188
  external_customer_id: nil,
189
+ # Whether to return line items with a quantity of zero. When omitted, Orb returns
190
+ # every line item. A line item that is grouped as part of a line item minimum is
191
+ # always returned; an invoice-level minimum does not exempt it.
192
+ include_zero_quantity_line_items: nil,
188
193
  invoice_date_gt: nil,
189
194
  invoice_date_gte: nil,
190
195
  invoice_date_lt: nil,
@@ -218,10 +223,18 @@ module Orb
218
223
  sig do
219
224
  params(
220
225
  invoice_id: String,
226
+ include_zero_quantity_line_items: T.nilable(T::Boolean),
221
227
  request_options: Orb::RequestOptions::OrHash
222
228
  ).returns(Orb::Invoice)
223
229
  end
224
- def fetch(invoice_id, request_options: {})
230
+ def fetch(
231
+ invoice_id,
232
+ # Whether to return line items with a quantity of zero. When omitted, Orb returns
233
+ # every line item. A line item that is grouped as part of a line item minimum is
234
+ # always returned; an invoice-level minimum does not exempt it.
235
+ include_zero_quantity_line_items: nil,
236
+ request_options: {}
237
+ )
225
238
  end
226
239
 
227
240
  # This endpoint can be used to fetch the upcoming
@@ -230,10 +243,18 @@ module Orb
230
243
  sig do
231
244
  params(
232
245
  subscription_id: String,
246
+ include_zero_quantity_line_items: T.nilable(T::Boolean),
233
247
  request_options: Orb::RequestOptions::OrHash
234
248
  ).returns(Orb::Models::InvoiceFetchUpcomingResponse)
235
249
  end
236
- def fetch_upcoming(subscription_id:, request_options: {})
250
+ def fetch_upcoming(
251
+ subscription_id:,
252
+ # Whether to return line items with a quantity of zero. When omitted, Orb returns
253
+ # every line item. A line item that is grouped as part of a line item minimum is
254
+ # always returned; an invoice-level minimum does not exempt it.
255
+ include_zero_quantity_line_items: nil,
256
+ request_options: {}
257
+ )
237
258
  end
238
259
 
239
260
  # This endpoint allows an eligible invoice to be issued manually. This is only
@@ -47,6 +47,7 @@ module Orb
47
47
  discounts: ::Array[Orb::Models::invoice_level_discount],
48
48
  due_date: Time?,
49
49
  eligible_to_issue_at: Time?,
50
+ hidden_line_item_count: Integer,
50
51
  hosted_invoice_url: String?,
51
52
  invoice_date: Time,
52
53
  invoice_number: String,
@@ -106,6 +107,8 @@ module Orb
106
107
 
107
108
  attr_accessor eligible_to_issue_at: Time?
108
109
 
110
+ attr_accessor hidden_line_item_count: Integer
111
+
109
112
  attr_accessor hosted_invoice_url: String?
110
113
 
111
114
  attr_accessor invoice_date: Time
@@ -177,6 +180,7 @@ module Orb
177
180
  discounts: ::Array[Orb::Models::invoice_level_discount],
178
181
  due_date: Time?,
179
182
  eligible_to_issue_at: Time?,
183
+ hidden_line_item_count: Integer,
180
184
  hosted_invoice_url: String?,
181
185
  invoice_date: Time,
182
186
  invoice_number: String,
@@ -222,6 +226,7 @@ module Orb
222
226
  discounts: ::Array[Orb::Models::invoice_level_discount],
223
227
  due_date: Time?,
224
228
  eligible_to_issue_at: Time?,
229
+ hidden_line_item_count: Integer,
225
230
  hosted_invoice_url: String?,
226
231
  invoice_date: Time,
227
232
  invoice_number: String,
@@ -16,6 +16,7 @@ module Orb
16
16
  discounts: ::Array[Orb::Models::invoice_level_discount],
17
17
  due_date: Time?,
18
18
  eligible_to_issue_at: Time?,
19
+ hidden_line_item_count: Integer,
19
20
  hosted_invoice_url: String?,
20
21
  invoice_date: Time,
21
22
  invoice_number: String,
@@ -74,6 +75,8 @@ module Orb
74
75
 
75
76
  attr_accessor eligible_to_issue_at: Time?
76
77
 
78
+ attr_accessor hidden_line_item_count: Integer
79
+
77
80
  attr_accessor hosted_invoice_url: String?
78
81
 
79
82
  attr_accessor invoice_date: Time
@@ -143,6 +146,7 @@ module Orb
143
146
  discounts: ::Array[Orb::Models::invoice_level_discount],
144
147
  due_date: Time?,
145
148
  eligible_to_issue_at: Time?,
149
+ hidden_line_item_count: Integer,
146
150
  hosted_invoice_url: String?,
147
151
  invoice_date: Time,
148
152
  invoice_number: String,
@@ -187,6 +191,7 @@ module Orb
187
191
  discounts: ::Array[Orb::Models::invoice_level_discount],
188
192
  due_date: Time?,
189
193
  eligible_to_issue_at: Time?,
194
+ hidden_line_item_count: Integer,
190
195
  hosted_invoice_url: String?,
191
196
  invoice_date: Time,
192
197
  invoice_number: String,
@@ -1,7 +1,8 @@
1
1
  module Orb
2
2
  module Models
3
3
  type invoice_fetch_params =
4
- { invoice_id: String } & Orb::Internal::Type::request_parameters
4
+ { invoice_id: String, include_zero_quantity_line_items: bool? }
5
+ & Orb::Internal::Type::request_parameters
5
6
 
6
7
  class InvoiceFetchParams < Orb::Internal::Type::BaseModel
7
8
  extend Orb::Internal::Type::RequestParameters::Converter
@@ -9,13 +10,17 @@ module Orb
9
10
 
10
11
  attr_accessor invoice_id: String
11
12
 
13
+ attr_accessor include_zero_quantity_line_items: bool?
14
+
12
15
  def initialize: (
13
16
  invoice_id: String,
17
+ ?include_zero_quantity_line_items: bool?,
14
18
  ?request_options: Orb::request_opts
15
19
  ) -> void
16
20
 
17
21
  def to_hash: -> {
18
22
  invoice_id: String,
23
+ include_zero_quantity_line_items: bool?,
19
24
  request_options: Orb::RequestOptions
20
25
  }
21
26
  end
@@ -1,7 +1,8 @@
1
1
  module Orb
2
2
  module Models
3
3
  type invoice_fetch_upcoming_params =
4
- { subscription_id: String } & Orb::Internal::Type::request_parameters
4
+ { subscription_id: String, include_zero_quantity_line_items: bool? }
5
+ & Orb::Internal::Type::request_parameters
5
6
 
6
7
  class InvoiceFetchUpcomingParams < Orb::Internal::Type::BaseModel
7
8
  extend Orb::Internal::Type::RequestParameters::Converter
@@ -9,13 +10,17 @@ module Orb
9
10
 
10
11
  attr_accessor subscription_id: String
11
12
 
13
+ attr_accessor include_zero_quantity_line_items: bool?
14
+
12
15
  def initialize: (
13
16
  subscription_id: String,
17
+ ?include_zero_quantity_line_items: bool?,
14
18
  ?request_options: Orb::request_opts
15
19
  ) -> void
16
20
 
17
21
  def to_hash: -> {
18
22
  subscription_id: String,
23
+ include_zero_quantity_line_items: bool?,
19
24
  request_options: Orb::RequestOptions
20
25
  }
21
26
  end
@@ -16,6 +16,7 @@ module Orb
16
16
  discounts: ::Array[Orb::Models::invoice_level_discount],
17
17
  due_date: Time?,
18
18
  eligible_to_issue_at: Time?,
19
+ hidden_line_item_count: Integer,
19
20
  hosted_invoice_url: String?,
20
21
  invoice_number: String,
21
22
  invoice_pdf: String?,
@@ -74,6 +75,8 @@ module Orb
74
75
 
75
76
  attr_accessor eligible_to_issue_at: Time?
76
77
 
78
+ attr_accessor hidden_line_item_count: Integer
79
+
77
80
  attr_accessor hosted_invoice_url: String?
78
81
 
79
82
  attr_accessor invoice_number: String
@@ -143,6 +146,7 @@ module Orb
143
146
  discounts: ::Array[Orb::Models::invoice_level_discount],
144
147
  due_date: Time?,
145
148
  eligible_to_issue_at: Time?,
149
+ hidden_line_item_count: Integer,
146
150
  hosted_invoice_url: String?,
147
151
  invoice_number: String,
148
152
  invoice_pdf: String?,
@@ -187,6 +191,7 @@ module Orb
187
191
  discounts: ::Array[Orb::Models::invoice_level_discount],
188
192
  due_date: Time?,
189
193
  eligible_to_issue_at: Time?,
194
+ hidden_line_item_count: Integer,
190
195
  hosted_invoice_url: String?,
191
196
  invoice_number: String,
192
197
  invoice_pdf: String?,
@@ -13,6 +13,7 @@ module Orb
13
13
  due_date_gt: Date?,
14
14
  due_date_lt: Date?,
15
15
  external_customer_id: String?,
16
+ include_zero_quantity_line_items: bool?,
16
17
  invoice_date_gt: Time?,
17
18
  invoice_date_gte: Time?,
18
19
  invoice_date_lt: Time?,
@@ -50,6 +51,8 @@ module Orb
50
51
 
51
52
  attr_accessor external_customer_id: String?
52
53
 
54
+ attr_accessor include_zero_quantity_line_items: bool?
55
+
53
56
  attr_accessor invoice_date_gt: Time?
54
57
 
55
58
  attr_accessor invoice_date_gte: Time?
@@ -80,6 +83,7 @@ module Orb
80
83
  ?due_date_gt: Date?,
81
84
  ?due_date_lt: Date?,
82
85
  ?external_customer_id: String?,
86
+ ?include_zero_quantity_line_items: bool?,
83
87
  ?invoice_date_gt: Time?,
84
88
  ?invoice_date_gte: Time?,
85
89
  ?invoice_date_lt: Time?,
@@ -103,6 +107,7 @@ module Orb
103
107
  due_date_gt: Date?,
104
108
  due_date_lt: Date?,
105
109
  external_customer_id: String?,
110
+ include_zero_quantity_line_items: bool?,
106
111
  invoice_date_gt: Time?,
107
112
  invoice_date_gte: Time?,
108
113
  invoice_date_lt: Time?,
@@ -39,6 +39,7 @@ module Orb
39
39
  ?due_date_gt: Date?,
40
40
  ?due_date_lt: Date?,
41
41
  ?external_customer_id: String?,
42
+ ?include_zero_quantity_line_items: bool?,
42
43
  ?invoice_date_gt: Time?,
43
44
  ?invoice_date_gte: Time?,
44
45
  ?invoice_date_lt: Time?,
@@ -58,11 +59,13 @@ module Orb
58
59
 
59
60
  def fetch: (
60
61
  String invoice_id,
62
+ ?include_zero_quantity_line_items: bool?,
61
63
  ?request_options: Orb::request_opts
62
64
  ) -> Orb::Invoice
63
65
 
64
66
  def fetch_upcoming: (
65
67
  subscription_id: String,
68
+ ?include_zero_quantity_line_items: bool?,
66
69
  ?request_options: Orb::request_opts
67
70
  ) -> Orb::Models::InvoiceFetchUpcomingResponse
68
71
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orb-billing
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.32.0
4
+ version: 1.34.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orb