orb-billing 1.48.0 → 1.50.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.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -1
  4. data/lib/orb/models/changed_subscription_resources.rb +21 -1
  5. data/lib/orb/models/customers/credit_fetch_balance_by_external_id_params.rb +31 -0
  6. data/lib/orb/models/customers/credit_fetch_balance_by_external_id_response.rb +61 -0
  7. data/lib/orb/models/customers/credit_fetch_balance_params.rb +31 -0
  8. data/lib/orb/models/customers/credit_fetch_balance_response.rb +60 -0
  9. data/lib/orb/models/invoice.rb +21 -1
  10. data/lib/orb/models/invoice_fetch_upcoming_response.rb +21 -1
  11. data/lib/orb/models/invoice_issue_summary_response.rb +21 -1
  12. data/lib/orb/models/invoice_issued_summary_webhook_event.rb +21 -1
  13. data/lib/orb/models/invoice_list_summary_response.rb +21 -1
  14. data/lib/orb/models/subscription_list_summary_params.rb +108 -0
  15. data/lib/orb/models/subscription_list_summary_response.rb +130 -0
  16. data/lib/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rb +21 -1
  17. data/lib/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rb +21 -1
  18. data/lib/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rb +21 -1
  19. data/lib/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rb +21 -1
  20. data/lib/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rb +21 -1
  21. data/lib/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rb +21 -1
  22. data/lib/orb/models/webhooks/invoice_edited_standard_webhook_event.rb +21 -1
  23. data/lib/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rb +21 -1
  24. data/lib/orb/models/webhooks/invoice_issued_standard_webhook_event.rb +21 -1
  25. data/lib/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rb +21 -1
  26. data/lib/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rb +21 -1
  27. data/lib/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rb +21 -1
  28. data/lib/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rb +21 -1
  29. data/lib/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rb +21 -1
  30. data/lib/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rb +21 -1
  31. data/lib/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rb +21 -1
  32. data/lib/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rb +21 -1
  33. data/lib/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rb +21 -1
  34. data/lib/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rb +21 -1
  35. data/lib/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rb +21 -1
  36. data/lib/orb/models.rb +2 -0
  37. data/lib/orb/resources/alerts.rb +7 -4
  38. data/lib/orb/resources/customers/credits.rb +76 -0
  39. data/lib/orb/resources/subscriptions.rb +60 -0
  40. data/lib/orb/version.rb +1 -1
  41. data/lib/orb.rb +6 -0
  42. data/rbi/orb/models/changed_subscription_resources.rbi +24 -0
  43. data/rbi/orb/models/customers/credit_fetch_balance_by_external_id_params.rbi +54 -0
  44. data/rbi/orb/models/customers/credit_fetch_balance_by_external_id_response.rbi +86 -0
  45. data/rbi/orb/models/customers/credit_fetch_balance_params.rbi +54 -0
  46. data/rbi/orb/models/customers/credit_fetch_balance_response.rbi +86 -0
  47. data/rbi/orb/models/invoice.rbi +24 -0
  48. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +24 -0
  49. data/rbi/orb/models/invoice_issue_summary_response.rbi +24 -0
  50. data/rbi/orb/models/invoice_issued_summary_webhook_event.rbi +24 -0
  51. data/rbi/orb/models/invoice_list_summary_response.rbi +24 -0
  52. data/rbi/orb/models/subscription_list_summary_params.rbi +148 -0
  53. data/rbi/orb/models/subscription_list_summary_response.rbi +214 -0
  54. data/rbi/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rbi +24 -0
  55. data/rbi/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rbi +24 -0
  56. data/rbi/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rbi +24 -0
  57. data/rbi/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rbi +24 -0
  58. data/rbi/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rbi +24 -0
  59. data/rbi/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rbi +24 -0
  60. data/rbi/orb/models/webhooks/invoice_edited_standard_webhook_event.rbi +24 -0
  61. data/rbi/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rbi +24 -0
  62. data/rbi/orb/models/webhooks/invoice_issued_standard_webhook_event.rbi +24 -0
  63. data/rbi/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rbi +24 -0
  64. data/rbi/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rbi +24 -0
  65. data/rbi/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rbi +24 -0
  66. data/rbi/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rbi +24 -0
  67. data/rbi/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rbi +24 -0
  68. data/rbi/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rbi +24 -0
  69. data/rbi/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rbi +24 -0
  70. data/rbi/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rbi +24 -0
  71. data/rbi/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rbi +24 -0
  72. data/rbi/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rbi +24 -0
  73. data/rbi/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rbi +24 -0
  74. data/rbi/orb/models.rbi +2 -0
  75. data/rbi/orb/resources/alerts.rbi +7 -4
  76. data/rbi/orb/resources/customers/credits.rbi +60 -0
  77. data/rbi/orb/resources/subscriptions.rbi +47 -0
  78. data/sig/orb/models/changed_subscription_resources.rbs +10 -0
  79. data/sig/orb/models/customers/credit_fetch_balance_by_external_id_params.rbs +30 -0
  80. data/sig/orb/models/customers/credit_fetch_balance_by_external_id_response.rbs +42 -0
  81. data/sig/orb/models/customers/credit_fetch_balance_params.rbs +30 -0
  82. data/sig/orb/models/customers/credit_fetch_balance_response.rbs +42 -0
  83. data/sig/orb/models/invoice.rbs +10 -0
  84. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +10 -0
  85. data/sig/orb/models/invoice_issue_summary_response.rbs +10 -0
  86. data/sig/orb/models/invoice_issued_summary_webhook_event.rbs +10 -0
  87. data/sig/orb/models/invoice_list_summary_response.rbs +10 -0
  88. data/sig/orb/models/subscription_list_summary_params.rbs +90 -0
  89. data/sig/orb/models/subscription_list_summary_response.rbs +94 -0
  90. data/sig/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rbs +10 -0
  91. data/sig/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rbs +10 -0
  92. data/sig/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rbs +10 -0
  93. data/sig/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rbs +10 -0
  94. data/sig/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rbs +10 -0
  95. data/sig/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rbs +10 -0
  96. data/sig/orb/models/webhooks/invoice_edited_standard_webhook_event.rbs +10 -0
  97. data/sig/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rbs +10 -0
  98. data/sig/orb/models/webhooks/invoice_issued_standard_webhook_event.rbs +10 -0
  99. data/sig/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rbs +10 -0
  100. data/sig/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rbs +10 -0
  101. data/sig/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rbs +10 -0
  102. data/sig/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rbs +10 -0
  103. data/sig/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rbs +10 -0
  104. data/sig/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rbs +10 -0
  105. data/sig/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rbs +10 -0
  106. data/sig/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rbs +10 -0
  107. data/sig/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rbs +10 -0
  108. data/sig/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rbs +10 -0
  109. data/sig/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rbs +10 -0
  110. data/sig/orb/models.rbs +2 -0
  111. data/sig/orb/resources/customers/credits.rbs +12 -0
  112. data/sig/orb/resources/subscriptions.rbs +15 -0
  113. metadata +19 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a525b92a1a6f29957b2cb25a56d07bffb8e69a009852a1f2ca72132a2e2f531
4
- data.tar.gz: 429829175519be27c097d4d1cc1079eb358bf57038303228085e85c9ddda4242
3
+ metadata.gz: 686dfa30d24bcb66cbebd57b0100bda5047ef75ec9d37f56311c84260688e8d7
4
+ data.tar.gz: 14587b5ac749808d4e97b9a4ed1bb48f3f9ae063fc88ea4dc868995e77089ea4
5
5
  SHA512:
6
- metadata.gz: e89d1b03c858c4f8971a925951a800ccba1c58b072f791db95c732b216e8b507b7e9ced541a96c4a6be656c6f1f2ba9237b63a7c697fe8c67cd7757d9bc74a33
7
- data.tar.gz: 5fcd2c53b737a529881de5d8391224ac614d71592c3e73a0857f56e7e9043996243155ddce23da4efe6b2e91c9fc2682b1267d055169b9eb75f92bf2cb13969c
6
+ metadata.gz: '047899ee6b80686d8b5458208c7e98d5410f2180857a9d08448b847e96b0e0fd787570e72d4719b4ac1204522a4e6bf58a24c575ee7b9bee4eff928b761f7ab3'
7
+ data.tar.gz: 9168a1456c7442b31c7e40d96053eaedd5bffb355d92cc4a58ddcb60af368e8f22a8e6eb9b9676cdfe7b6faf505592aeaf1023d52e3bc156fe637285cb621c7f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.50.0](https://github.com/orbcorp/orb-ruby/compare/v1.49.0...v1.50.0) (2026-10-29)
4
+
5
+
6
+ ### Features
7
+
8
+ * **api:** api update ([b590f28](https://github.com/orbcorp/orb-ruby/commit/b590f28544e0267e1af12fbc9837b92e817243bc))
9
+
10
+ ## [1.49.0](https://github.com/orbcorp/orb-ruby/compare/v1.48.0...v1.49.0) (2026-10-27)
11
+
12
+
13
+ ### Features
14
+
15
+ * **api:** allow up to 50 spend_exceeded alerts per plan or subscription ([0448a00](https://github.com/orbcorp/orb-ruby/commit/0448a002cbad582b428b77b530b62460e6f96274))
16
+
3
17
  ## [1.48.0](https://github.com/orbcorp/orb-ruby/compare/v1.47.0...v1.48.0) (2026-10-24)
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.48.0"
18
+ gem "orb-billing", "~> 1.50.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -425,6 +425,22 @@ module Orb
425
425
  # @return [Time, nil]
426
426
  required :scheduled_issue_at, Time, nil?: true
427
427
 
428
+ # @!attribute service_period_end
429
+ # The latest `end_date` of the invoice's line items, including any line items
430
+ # hidden because they have zero quantity. This is `null` when the invoice has no
431
+ # line items.
432
+ #
433
+ # @return [Time, nil]
434
+ required :service_period_end, Time, nil?: true
435
+
436
+ # @!attribute service_period_start
437
+ # The earliest `start_date` of the invoice's line items, including any line items
438
+ # hidden because they have zero quantity. This is `null` when the invoice has no
439
+ # line items.
440
+ #
441
+ # @return [Time, nil]
442
+ required :service_period_start, Time, nil?: true
443
+
428
444
  # @!attribute shipping_address
429
445
  #
430
446
  # @return [Orb::Models::Address, nil]
@@ -474,7 +490,7 @@ module Orb
474
490
  # @return [Boolean]
475
491
  required :will_auto_issue, Orb::Internal::Type::Boolean
476
492
 
477
- # @!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_received_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, subtotal:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
493
+ # @!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_received_at:, payment_started_at:, scheduled_issue_at:, service_period_end:, service_period_start:, shipping_address:, status:, subscription:, subtotal:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
478
494
  # Some parameter documentations has been truncated, see
479
495
  # {Orb::Models::ChangedSubscriptionResources::CreatedInvoice} for more details.
480
496
  #
@@ -550,6 +566,10 @@ module Orb
550
566
  #
551
567
  # @param scheduled_issue_at [Time, nil] If the invoice is in draft, this timestamp will reflect when the invoice is sche
552
568
  #
569
+ # @param service_period_end [Time, nil] The latest `end_date` of the invoice's line items, including any line items hidd
570
+ #
571
+ # @param service_period_start [Time, nil] The earliest `start_date` of the invoice's line items, including any line items
572
+ #
553
573
  # @param shipping_address [Orb::Models::Address, nil]
554
574
  #
555
575
  # @param status [Symbol, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::Status]
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Orb
4
+ module Models
5
+ module Customers
6
+ # @see Orb::Resources::Customers::Credits#fetch_balance_by_external_id
7
+ class CreditFetchBalanceByExternalIDParams < Orb::Internal::Type::BaseModel
8
+ extend Orb::Internal::Type::RequestParameters::Converter
9
+ include Orb::Internal::Type::RequestParameters
10
+
11
+ # @!attribute external_customer_id
12
+ #
13
+ # @return [String]
14
+ required :external_customer_id, String
15
+
16
+ # @!attribute currency
17
+ # The ledger currency or custom pricing unit to use.
18
+ #
19
+ # @return [String, nil]
20
+ optional :currency, String, nil?: true
21
+
22
+ # @!method initialize(external_customer_id:, currency: nil, request_options: {})
23
+ # @param external_customer_id [String]
24
+ #
25
+ # @param currency [String, nil] The ledger currency or custom pricing unit to use.
26
+ #
27
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Orb
4
+ module Models
5
+ module Customers
6
+ # @see Orb::Resources::Customers::Credits#fetch_balance_by_external_id
7
+ class CreditFetchBalanceByExternalIDResponse < Orb::Internal::Type::BaseModel
8
+ # @!attribute balance
9
+ # The customer's available credit balance: the sum of `balance` across their
10
+ # `active` credit blocks.
11
+ #
12
+ # @return [Float]
13
+ required :balance, Float
14
+
15
+ # @!attribute currency
16
+ # The currency or custom pricing unit the balances are denominated in. Null when
17
+ # no `currency` is passed and the customer has no credit ledger, in which case
18
+ # every balance is `0`.
19
+ #
20
+ # @return [String, nil]
21
+ required :currency, String, nil?: true
22
+
23
+ # @!attribute next_expiry_balance
24
+ # The balance that expires on `next_expiry_date`. Null if `next_expiry_date` is
25
+ # null.
26
+ #
27
+ # @return [Float, nil]
28
+ required :next_expiry_balance, Float, nil?: true
29
+
30
+ # @!attribute next_expiry_date
31
+ # The earliest `expiry_date` among active credit blocks. Null if none of them
32
+ # expire.
33
+ #
34
+ # @return [Time, nil]
35
+ required :next_expiry_date, Time, nil?: true
36
+
37
+ # @!attribute pending_payment_balance
38
+ # The total balance of credit blocks in `pending_payment` status. Not included in
39
+ # `balance` until the invoice that funds them is paid.
40
+ #
41
+ # @return [Float]
42
+ required :pending_payment_balance, Float
43
+
44
+ # @!method initialize(balance:, currency:, next_expiry_balance:, next_expiry_date:, pending_payment_balance:)
45
+ # Some parameter documentations has been truncated, see
46
+ # {Orb::Models::Customers::CreditFetchBalanceByExternalIDResponse} for more
47
+ # details.
48
+ #
49
+ # @param balance [Float] The customer's available credit balance: the sum of `balance` across their `acti
50
+ #
51
+ # @param currency [String, nil] The currency or custom pricing unit the balances are denominated in. Null when n
52
+ #
53
+ # @param next_expiry_balance [Float, nil] The balance that expires on `next_expiry_date`. Null if `next_expiry_date` is nu
54
+ #
55
+ # @param next_expiry_date [Time, nil] The earliest `expiry_date` among active credit blocks. Null if none of them expi
56
+ #
57
+ # @param pending_payment_balance [Float] The total balance of credit blocks in `pending_payment` status. Not included in
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Orb
4
+ module Models
5
+ module Customers
6
+ # @see Orb::Resources::Customers::Credits#fetch_balance
7
+ class CreditFetchBalanceParams < Orb::Internal::Type::BaseModel
8
+ extend Orb::Internal::Type::RequestParameters::Converter
9
+ include Orb::Internal::Type::RequestParameters
10
+
11
+ # @!attribute customer_id
12
+ #
13
+ # @return [String]
14
+ required :customer_id, String
15
+
16
+ # @!attribute currency
17
+ # The ledger currency or custom pricing unit to use.
18
+ #
19
+ # @return [String, nil]
20
+ optional :currency, String, nil?: true
21
+
22
+ # @!method initialize(customer_id:, currency: nil, request_options: {})
23
+ # @param customer_id [String]
24
+ #
25
+ # @param currency [String, nil] The ledger currency or custom pricing unit to use.
26
+ #
27
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Orb
4
+ module Models
5
+ module Customers
6
+ # @see Orb::Resources::Customers::Credits#fetch_balance
7
+ class CreditFetchBalanceResponse < Orb::Internal::Type::BaseModel
8
+ # @!attribute balance
9
+ # The customer's available credit balance: the sum of `balance` across their
10
+ # `active` credit blocks.
11
+ #
12
+ # @return [Float]
13
+ required :balance, Float
14
+
15
+ # @!attribute currency
16
+ # The currency or custom pricing unit the balances are denominated in. Null when
17
+ # no `currency` is passed and the customer has no credit ledger, in which case
18
+ # every balance is `0`.
19
+ #
20
+ # @return [String, nil]
21
+ required :currency, String, nil?: true
22
+
23
+ # @!attribute next_expiry_balance
24
+ # The balance that expires on `next_expiry_date`. Null if `next_expiry_date` is
25
+ # null.
26
+ #
27
+ # @return [Float, nil]
28
+ required :next_expiry_balance, Float, nil?: true
29
+
30
+ # @!attribute next_expiry_date
31
+ # The earliest `expiry_date` among active credit blocks. Null if none of them
32
+ # expire.
33
+ #
34
+ # @return [Time, nil]
35
+ required :next_expiry_date, Time, nil?: true
36
+
37
+ # @!attribute pending_payment_balance
38
+ # The total balance of credit blocks in `pending_payment` status. Not included in
39
+ # `balance` until the invoice that funds them is paid.
40
+ #
41
+ # @return [Float]
42
+ required :pending_payment_balance, Float
43
+
44
+ # @!method initialize(balance:, currency:, next_expiry_balance:, next_expiry_date:, pending_payment_balance:)
45
+ # Some parameter documentations has been truncated, see
46
+ # {Orb::Models::Customers::CreditFetchBalanceResponse} for more details.
47
+ #
48
+ # @param balance [Float] The customer's available credit balance: the sum of `balance` across their `acti
49
+ #
50
+ # @param currency [String, nil] The currency or custom pricing unit the balances are denominated in. Null when n
51
+ #
52
+ # @param next_expiry_balance [Float, nil] The balance that expires on `next_expiry_date`. Null if `next_expiry_date` is nu
53
+ #
54
+ # @param next_expiry_date [Time, nil] The earliest `expiry_date` among active credit blocks. Null if none of them expi
55
+ #
56
+ # @param pending_payment_balance [Float] The total balance of credit blocks in `pending_payment` status. Not included in
57
+ end
58
+ end
59
+ end
60
+ end
@@ -381,6 +381,22 @@ module Orb
381
381
  # @return [Time, nil]
382
382
  required :scheduled_issue_at, Time, nil?: true
383
383
 
384
+ # @!attribute service_period_end
385
+ # The latest `end_date` of the invoice's line items, including any line items
386
+ # hidden because they have zero quantity. This is `null` when the invoice has no
387
+ # line items.
388
+ #
389
+ # @return [Time, nil]
390
+ required :service_period_end, Time, nil?: true
391
+
392
+ # @!attribute service_period_start
393
+ # The earliest `start_date` of the invoice's line items, including any line items
394
+ # hidden because they have zero quantity. This is `null` when the invoice has no
395
+ # line items.
396
+ #
397
+ # @return [Time, nil]
398
+ required :service_period_start, Time, nil?: true
399
+
384
400
  # @!attribute shipping_address
385
401
  #
386
402
  # @return [Orb::Models::Address, nil]
@@ -430,7 +446,7 @@ module Orb
430
446
  # @return [Boolean]
431
447
  required :will_auto_issue, Orb::Internal::Type::Boolean
432
448
 
433
- # @!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_received_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, subtotal:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
449
+ # @!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_received_at:, payment_started_at:, scheduled_issue_at:, service_period_end:, service_period_start:, shipping_address:, status:, subscription:, subtotal:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
434
450
  # Some parameter documentations has been truncated, see {Orb::Models::Invoice} for
435
451
  # more details.
436
452
  #
@@ -510,6 +526,10 @@ module Orb
510
526
  #
511
527
  # @param scheduled_issue_at [Time, nil] If the invoice is in draft, this timestamp will reflect when the invoice is sche
512
528
  #
529
+ # @param service_period_end [Time, nil] The latest `end_date` of the invoice's line items, including any line items hidd
530
+ #
531
+ # @param service_period_start [Time, nil] The earliest `start_date` of the invoice's line items, including any line items
532
+ #
513
533
  # @param shipping_address [Orb::Models::Address, nil]
514
534
  #
515
535
  # @param status [Symbol, Orb::Models::Invoice::Status]
@@ -379,6 +379,22 @@ module Orb
379
379
  # @return [Time, nil]
380
380
  required :scheduled_issue_at, Time, nil?: true
381
381
 
382
+ # @!attribute service_period_end
383
+ # The latest `end_date` of the invoice's line items, including any line items
384
+ # hidden because they have zero quantity. This is `null` when the invoice has no
385
+ # line items.
386
+ #
387
+ # @return [Time, nil]
388
+ required :service_period_end, Time, nil?: true
389
+
390
+ # @!attribute service_period_start
391
+ # The earliest `start_date` of the invoice's line items, including any line items
392
+ # hidden because they have zero quantity. This is `null` when the invoice has no
393
+ # line items.
394
+ #
395
+ # @return [Time, nil]
396
+ required :service_period_start, Time, nil?: true
397
+
382
398
  # @!attribute shipping_address
383
399
  #
384
400
  # @return [Orb::Models::Address, nil]
@@ -434,7 +450,7 @@ module Orb
434
450
  # @return [Boolean]
435
451
  required :will_auto_issue, Orb::Internal::Type::Boolean
436
452
 
437
- # @!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_received_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, subtotal:, sync_failed_at:, target_date:, total:, voided_at:, will_auto_issue:)
453
+ # @!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_received_at:, payment_started_at:, scheduled_issue_at:, service_period_end:, service_period_start:, shipping_address:, status:, subscription:, subtotal:, sync_failed_at:, target_date:, total:, voided_at:, will_auto_issue:)
438
454
  # Some parameter documentations has been truncated, see
439
455
  # {Orb::Models::InvoiceFetchUpcomingResponse} for more details.
440
456
  #
@@ -506,6 +522,10 @@ module Orb
506
522
  #
507
523
  # @param scheduled_issue_at [Time, nil] If the invoice is in draft, this timestamp will reflect when the invoice is sche
508
524
  #
525
+ # @param service_period_end [Time, nil] The latest `end_date` of the invoice's line items, including any line items hidd
526
+ #
527
+ # @param service_period_start [Time, nil] The earliest `start_date` of the invoice's line items, including any line items
528
+ #
509
529
  # @param shipping_address [Orb::Models::Address, nil]
510
530
  #
511
531
  # @param status [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::Status]
@@ -334,6 +334,22 @@ module Orb
334
334
  # @return [Time, nil]
335
335
  required :scheduled_issue_at, Time, nil?: true
336
336
 
337
+ # @!attribute service_period_end
338
+ # The latest `end_date` of the invoice's line items, including any line items
339
+ # hidden because they have zero quantity. This is `null` when the invoice has no
340
+ # line items.
341
+ #
342
+ # @return [Time, nil]
343
+ required :service_period_end, Time, nil?: true
344
+
345
+ # @!attribute service_period_start
346
+ # The earliest `start_date` of the invoice's line items, including any line items
347
+ # hidden because they have zero quantity. This is `null` when the invoice has no
348
+ # line items.
349
+ #
350
+ # @return [Time, nil]
351
+ required :service_period_start, Time, nil?: true
352
+
337
353
  # @!attribute shipping_address
338
354
  #
339
355
  # @return [Orb::Models::Address, nil]
@@ -377,7 +393,7 @@ module Orb
377
393
  # @return [Boolean]
378
394
  required :will_auto_issue, Orb::Internal::Type::Boolean
379
395
 
380
- # @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
396
+ # @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, service_period_end:, service_period_start:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
381
397
  # Some parameter documentations has been truncated, see
382
398
  # {Orb::Models::InvoiceIssueSummaryResponse} for more details.
383
399
  #
@@ -438,6 +454,10 @@ module Orb
438
454
  #
439
455
  # @param scheduled_issue_at [Time, nil] If the invoice is in draft, this timestamp will reflect when the invoice is sche
440
456
  #
457
+ # @param service_period_end [Time, nil] The latest `end_date` of the invoice's line items, including any line items hidd
458
+ #
459
+ # @param service_period_start [Time, nil] The earliest `start_date` of the invoice's line items, including any line items
460
+ #
441
461
  # @param shipping_address [Orb::Models::Address, nil]
442
462
  #
443
463
  # @param status [Symbol, Orb::Models::InvoiceIssueSummaryResponse::Status]
@@ -391,6 +391,22 @@ module Orb
391
391
  # @return [Time, nil]
392
392
  required :scheduled_issue_at, Time, nil?: true
393
393
 
394
+ # @!attribute service_period_end
395
+ # The latest `end_date` of the invoice's line items, including any line items
396
+ # hidden because they have zero quantity. This is `null` when the invoice has no
397
+ # line items.
398
+ #
399
+ # @return [Time, nil]
400
+ required :service_period_end, Time, nil?: true
401
+
402
+ # @!attribute service_period_start
403
+ # The earliest `start_date` of the invoice's line items, including any line items
404
+ # hidden because they have zero quantity. This is `null` when the invoice has no
405
+ # line items.
406
+ #
407
+ # @return [Time, nil]
408
+ required :service_period_start, Time, nil?: true
409
+
394
410
  # @!attribute shipping_address
395
411
  #
396
412
  # @return [Orb::Models::Address, nil]
@@ -434,7 +450,7 @@ module Orb
434
450
  # @return [Boolean]
435
451
  required :will_auto_issue, Orb::Internal::Type::Boolean
436
452
 
437
- # @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
453
+ # @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, service_period_end:, service_period_start:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
438
454
  # Some parameter documentations has been truncated, see
439
455
  # {Orb::Models::InvoiceIssuedSummaryWebhookEvent::Invoice} for more details.
440
456
  #
@@ -495,6 +511,10 @@ module Orb
495
511
  #
496
512
  # @param scheduled_issue_at [Time, nil] If the invoice is in draft, this timestamp will reflect when the invoice is sche
497
513
  #
514
+ # @param service_period_end [Time, nil] The latest `end_date` of the invoice's line items, including any line items hidd
515
+ #
516
+ # @param service_period_start [Time, nil] The earliest `start_date` of the invoice's line items, including any line items
517
+ #
498
518
  # @param shipping_address [Orb::Models::Address, nil]
499
519
  #
500
520
  # @param status [Symbol, Orb::Models::InvoiceIssuedSummaryWebhookEvent::Invoice::Status]
@@ -334,6 +334,22 @@ module Orb
334
334
  # @return [Time, nil]
335
335
  required :scheduled_issue_at, Time, nil?: true
336
336
 
337
+ # @!attribute service_period_end
338
+ # The latest `end_date` of the invoice's line items, including any line items
339
+ # hidden because they have zero quantity. This is `null` when the invoice has no
340
+ # line items.
341
+ #
342
+ # @return [Time, nil]
343
+ required :service_period_end, Time, nil?: true
344
+
345
+ # @!attribute service_period_start
346
+ # The earliest `start_date` of the invoice's line items, including any line items
347
+ # hidden because they have zero quantity. This is `null` when the invoice has no
348
+ # line items.
349
+ #
350
+ # @return [Time, nil]
351
+ required :service_period_start, Time, nil?: true
352
+
337
353
  # @!attribute shipping_address
338
354
  #
339
355
  # @return [Orb::Models::Address, nil]
@@ -377,7 +393,7 @@ module Orb
377
393
  # @return [Boolean]
378
394
  required :will_auto_issue, Orb::Internal::Type::Boolean
379
395
 
380
- # @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
396
+ # @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, service_period_end:, service_period_start:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
381
397
  # Some parameter documentations has been truncated, see
382
398
  # {Orb::Models::InvoiceListSummaryResponse} for more details.
383
399
  #
@@ -438,6 +454,10 @@ module Orb
438
454
  #
439
455
  # @param scheduled_issue_at [Time, nil] If the invoice is in draft, this timestamp will reflect when the invoice is sche
440
456
  #
457
+ # @param service_period_end [Time, nil] The latest `end_date` of the invoice's line items, including any line items hidd
458
+ #
459
+ # @param service_period_start [Time, nil] The earliest `start_date` of the invoice's line items, including any line items
460
+ #
441
461
  # @param shipping_address [Orb::Models::Address, nil]
442
462
  #
443
463
  # @param status [Symbol, Orb::Models::InvoiceListSummaryResponse::Status]
@@ -0,0 +1,108 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Orb
4
+ module Models
5
+ # @see Orb::Resources::Subscriptions#list_summary
6
+ class SubscriptionListSummaryParams < Orb::Internal::Type::BaseModel
7
+ extend Orb::Internal::Type::RequestParameters::Converter
8
+ include Orb::Internal::Type::RequestParameters
9
+
10
+ # @!attribute created_at_gt
11
+ #
12
+ # @return [Time, nil]
13
+ optional :created_at_gt, Time, nil?: true
14
+
15
+ # @!attribute created_at_gte
16
+ #
17
+ # @return [Time, nil]
18
+ optional :created_at_gte, Time, nil?: true
19
+
20
+ # @!attribute created_at_lt
21
+ #
22
+ # @return [Time, nil]
23
+ optional :created_at_lt, Time, nil?: true
24
+
25
+ # @!attribute created_at_lte
26
+ #
27
+ # @return [Time, nil]
28
+ optional :created_at_lte, Time, nil?: true
29
+
30
+ # @!attribute cursor
31
+ # Cursor for pagination. This can be populated by the `next_cursor` value returned
32
+ # from the initial request.
33
+ #
34
+ # @return [String, nil]
35
+ optional :cursor, String, nil?: true
36
+
37
+ # @!attribute customer_id
38
+ #
39
+ # @return [String, nil]
40
+ optional :customer_id, String, nil?: true
41
+
42
+ # @!attribute external_customer_id
43
+ #
44
+ # @return [String, nil]
45
+ optional :external_customer_id, String, nil?: true
46
+
47
+ # @!attribute external_plan_id
48
+ #
49
+ # @return [String, nil]
50
+ optional :external_plan_id, String, nil?: true
51
+
52
+ # @!attribute limit
53
+ # The number of items to fetch. Defaults to 20.
54
+ #
55
+ # @return [Integer, nil]
56
+ optional :limit, Integer
57
+
58
+ # @!attribute plan_id
59
+ #
60
+ # @return [String, nil]
61
+ optional :plan_id, String, nil?: true
62
+
63
+ # @!attribute status
64
+ #
65
+ # @return [Symbol, Orb::Models::SubscriptionListSummaryParams::Status, nil]
66
+ optional :status, enum: -> { Orb::SubscriptionListSummaryParams::Status }, nil?: true
67
+
68
+ # @!method initialize(created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, cursor: nil, customer_id: nil, external_customer_id: nil, external_plan_id: nil, limit: nil, plan_id: nil, status: nil, request_options: {})
69
+ # Some parameter documentations has been truncated, see
70
+ # {Orb::Models::SubscriptionListSummaryParams} for more details.
71
+ #
72
+ # @param created_at_gt [Time, nil]
73
+ #
74
+ # @param created_at_gte [Time, nil]
75
+ #
76
+ # @param created_at_lt [Time, nil]
77
+ #
78
+ # @param created_at_lte [Time, nil]
79
+ #
80
+ # @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned
81
+ #
82
+ # @param customer_id [String, nil]
83
+ #
84
+ # @param external_customer_id [String, nil]
85
+ #
86
+ # @param external_plan_id [String, nil]
87
+ #
88
+ # @param limit [Integer] The number of items to fetch. Defaults to 20.
89
+ #
90
+ # @param plan_id [String, nil]
91
+ #
92
+ # @param status [Symbol, Orb::Models::SubscriptionListSummaryParams::Status, nil]
93
+ #
94
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
95
+
96
+ module Status
97
+ extend Orb::Internal::Type::Enum
98
+
99
+ ACTIVE = :active
100
+ ENDED = :ended
101
+ UPCOMING = :upcoming
102
+
103
+ # @!method self.values
104
+ # @return [Array<Symbol>]
105
+ end
106
+ end
107
+ end
108
+ end