orb-billing 1.8.0 → 1.10.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 (33) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +1 -1
  4. data/lib/orb/models/customer_update_by_external_id_params.rb +6 -3
  5. data/lib/orb/models/customer_update_params.rb +6 -3
  6. data/lib/orb/models/customers/cost_list_by_external_id_params.rb +2 -2
  7. data/lib/orb/models/customers/cost_list_params.rb +2 -2
  8. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +3 -3
  9. data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +3 -3
  10. data/lib/orb/models/invoice_create_params.rb +12 -12
  11. data/lib/orb/models/subscription_fetch_costs_params.rb +2 -2
  12. data/lib/orb/resources/customers/costs.rb +2 -2
  13. data/lib/orb/resources/customers.rb +2 -2
  14. data/lib/orb/resources/invoices.rb +8 -7
  15. data/lib/orb/resources/subscriptions.rb +1 -1
  16. data/lib/orb/version.rb +1 -1
  17. data/rbi/orb/models/customer_update_by_external_id_params.rbi +10 -4
  18. data/rbi/orb/models/customer_update_params.rbi +10 -4
  19. data/rbi/orb/models/customers/cost_list_by_external_id_params.rbi +2 -2
  20. data/rbi/orb/models/customers/cost_list_params.rbi +2 -2
  21. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +3 -3
  22. data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +3 -3
  23. data/rbi/orb/models/invoice_create_params.rbi +14 -14
  24. data/rbi/orb/models/subscription_fetch_costs_params.rbi +2 -2
  25. data/rbi/orb/resources/customers/costs.rbi +2 -2
  26. data/rbi/orb/resources/customers.rbi +10 -4
  27. data/rbi/orb/resources/invoices.rbi +11 -10
  28. data/rbi/orb/resources/subscriptions.rbi +1 -1
  29. data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs +4 -4
  30. data/sig/orb/models/customers/credits/ledger_create_entry_params.rbs +4 -4
  31. data/sig/orb/models/invoice_create_params.rbs +5 -5
  32. data/sig/orb/resources/invoices.rbs +1 -1
  33. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 73eacd2178ce9b71a5008a0c26c266fcf6579d79722d724c57f57b77c8a38bad
4
- data.tar.gz: a18fc7d75c927d7d2d2e76e44434343e3104806c34330c1f3fdfd53da3816ce9
3
+ metadata.gz: a36105fb09d02890a315ca9a50fdd6a4e34732fbea2757c84efd04e7d527277e
4
+ data.tar.gz: '028189302e2c0e750456640cdf3007ce55e7693620b116213fa6b6c9fe233234'
5
5
  SHA512:
6
- metadata.gz: 9afea5e8284f240ee0fe7a3d911c4ae7d253f5fa8b320dd616524f68cdca6a256eae576471ca59472299e0894e51e618e3cc792818ce7a931d53ac88473ade73
7
- data.tar.gz: cdb483431879ee339cf54f769f174cf8b2a08b240d64ed079c631640385c020c26a8f994083b4bdc3f6102d1ecdf26cd40aedf137aeea7f90b3c4f9a783712b6
6
+ metadata.gz: a4632adc1758dde42c9395047409118e314e1e51d76fbb661a6b7204d618d75e7e387e8c6375c37a1e12c1dd6fa25d254f340e2fc14b985a0372edb9d6bb1a2b
7
+ data.tar.gz: 84ff717a439ae6313d741341480ac9975d10c3a00e0e6f1b98a16b815b0d0cef646d6a774fb793f422274b4aa26325e746f60874f393e78b692ed480a0be8e73
data/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.10.0 (2025-07-24)
4
+
5
+ Full Changelog: [v1.9.0...v1.10.0](https://github.com/orbcorp/orb-ruby/compare/v1.9.0...v1.10.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([d29d009](https://github.com/orbcorp/orb-ruby/commit/d29d0090db27540e1c3db6401f6da794b5d0e9eb))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **internal:** version bump ([ee4d38b](https://github.com/orbcorp/orb-ruby/commit/ee4d38b21b33af78599b278d378d21afc9fb6f77))
15
+
16
+ ## 1.9.0 (2025-07-21)
17
+
18
+ Full Changelog: [v1.8.0...v1.9.0](https://github.com/orbcorp/orb-ruby/compare/v1.8.0...v1.9.0)
19
+
20
+ ### Features
21
+
22
+ * **api:** api update ([a6e890c](https://github.com/orbcorp/orb-ruby/commit/a6e890c40ec02098aac56daf3793545df289f914))
23
+
24
+
25
+ ### Chores
26
+
27
+ * **internal:** version bump ([4e5e51e](https://github.com/orbcorp/orb-ruby/commit/4e5e51e6255e54012d7aaab536a2d1cf239b30a2))
28
+
3
29
  ## 1.8.0 (2025-07-17)
4
30
 
5
31
  Full Changelog: [v1.7.0...v1.8.0](https://github.com/orbcorp/orb-ruby/compare/v1.7.0...v1.8.0)
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.8.0"
18
+ gem "orb-billing", "~> 1.10.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -51,8 +51,11 @@ module Orb
51
51
  optional :email_delivery, Orb::Internal::Type::Boolean, nil?: true
52
52
 
53
53
  # @!attribute external_customer_id
54
- # The external customer ID. This can only be set if empty and the customer has no
55
- # past or current subscriptions.
54
+ # The external customer ID. This can only be set if the customer has no existing
55
+ # external customer ID. Since this action may change usage quantities for all
56
+ # existing subscriptions, it is disallowed if the customer has issued invoices
57
+ # with usage line items and subject to the same restrictions as backdated
58
+ # subscription creation.
56
59
  #
57
60
  # @return [String, nil]
58
61
  optional :external_customer_id, String, nil?: true
@@ -243,7 +246,7 @@ module Orb
243
246
  #
244
247
  # @param email_delivery [Boolean, nil]
245
248
  #
246
- # @param external_customer_id [String, nil] The external customer ID. This can only be set if empty and the customer has no
249
+ # @param external_customer_id [String, nil] The external customer ID. This can only be set if the customer has no existing e
247
250
  #
248
251
  # @param hierarchy [Orb::Models::CustomerHierarchyConfig, nil] The hierarchical relationships for this customer.
249
252
  #
@@ -51,8 +51,11 @@ module Orb
51
51
  optional :email_delivery, Orb::Internal::Type::Boolean, nil?: true
52
52
 
53
53
  # @!attribute external_customer_id
54
- # The external customer ID. This can only be set if empty and the customer has no
55
- # past or current subscriptions.
54
+ # The external customer ID. This can only be set if the customer has no existing
55
+ # external customer ID. Since this action may change usage quantities for all
56
+ # existing subscriptions, it is disallowed if the customer has issued invoices
57
+ # with usage line items and subject to the same restrictions as backdated
58
+ # subscription creation.
56
59
  #
57
60
  # @return [String, nil]
58
61
  optional :external_customer_id, String, nil?: true
@@ -239,7 +242,7 @@ module Orb
239
242
  #
240
243
  # @param email_delivery [Boolean, nil]
241
244
  #
242
- # @param external_customer_id [String, nil] The external customer ID. This can only be set if empty and the customer has no
245
+ # @param external_customer_id [String, nil] The external customer ID. This can only be set if the customer has no existing e
243
246
  #
244
247
  # @param hierarchy [Orb::Models::CustomerHierarchyConfig, nil] The hierarchical relationships for this customer.
245
248
  #
@@ -9,7 +9,7 @@ module Orb
9
9
  include Orb::Internal::Type::RequestParameters
10
10
 
11
11
  # @!attribute currency
12
- # The currency to use.
12
+ # The currency or custom pricing unit to use.
13
13
  #
14
14
  # @return [String, nil]
15
15
  optional :currency, String, nil?: true
@@ -39,7 +39,7 @@ module Orb
39
39
  # Some parameter documentations has been truncated, see
40
40
  # {Orb::Models::Customers::CostListByExternalIDParams} for more details.
41
41
  #
42
- # @param currency [String, nil] The currency to use.
42
+ # @param currency [String, nil] The currency or custom pricing unit to use.
43
43
  #
44
44
  # @param timeframe_end [Time, nil] Costs returned are exclusive of `timeframe_end`.
45
45
  #
@@ -9,7 +9,7 @@ module Orb
9
9
  include Orb::Internal::Type::RequestParameters
10
10
 
11
11
  # @!attribute currency
12
- # The currency to use.
12
+ # The currency or custom pricing unit to use.
13
13
  #
14
14
  # @return [String, nil]
15
15
  optional :currency, String, nil?: true
@@ -39,7 +39,7 @@ module Orb
39
39
  # Some parameter documentations has been truncated, see
40
40
  # {Orb::Models::Customers::CostListParams} for more details.
41
41
  #
42
- # @param currency [String, nil] The currency to use.
42
+ # @param currency [String, nil] The currency or custom pricing unit to use.
43
43
  #
44
44
  # @param timeframe_end [Time, nil] Costs returned are exclusive of `timeframe_end`.
45
45
  #
@@ -153,8 +153,8 @@ module Orb
153
153
  # date for the invoice. If you intend the invoice to be due on issue, set this
154
154
  # to 0.
155
155
  #
156
- # @return [Integer]
157
- required :net_terms, Integer
156
+ # @return [Integer, nil]
157
+ required :net_terms, Integer, nil?: true
158
158
 
159
159
  # @!attribute invoice_date
160
160
  # An ISO 8601 format date that denotes when this invoice should be dated in the
@@ -193,7 +193,7 @@ module Orb
193
193
  #
194
194
  # @param auto_collection [Boolean] Whether the credits purchase invoice should auto collect with the customer's sav
195
195
  #
196
- # @param net_terms [Integer] The net terms determines the difference between the invoice date and the issue d
196
+ # @param net_terms [Integer, nil] The net terms determines the difference between the invoice date and the issue d
197
197
  #
198
198
  # @param invoice_date [Date, Time, nil] An ISO 8601 format date that denotes when this invoice should be dated in the cu
199
199
  #
@@ -149,8 +149,8 @@ module Orb
149
149
  # date for the invoice. If you intend the invoice to be due on issue, set this
150
150
  # to 0.
151
151
  #
152
- # @return [Integer]
153
- required :net_terms, Integer
152
+ # @return [Integer, nil]
153
+ required :net_terms, Integer, nil?: true
154
154
 
155
155
  # @!attribute invoice_date
156
156
  # An ISO 8601 format date that denotes when this invoice should be dated in the
@@ -189,7 +189,7 @@ module Orb
189
189
  #
190
190
  # @param auto_collection [Boolean] Whether the credits purchase invoice should auto collect with the customer's sav
191
191
  #
192
- # @param net_terms [Integer] The net terms determines the difference between the invoice date and the issue d
192
+ # @param net_terms [Integer, nil] The net terms determines the difference between the invoice date and the issue d
193
193
  #
194
194
  # @param invoice_date [Date, Time, nil] An ISO 8601 format date that denotes when this invoice should be dated in the cu
195
195
  #
@@ -26,15 +26,6 @@ module Orb
26
26
  # @return [Array<Orb::Models::InvoiceCreateParams::LineItem>]
27
27
  required :line_items, -> { Orb::Internal::Type::ArrayOf[Orb::InvoiceCreateParams::LineItem] }
28
28
 
29
- # @!attribute net_terms
30
- # Determines the difference between the invoice issue date for subscription
31
- # invoices as the date that they are due. A value of '0' here represents that the
32
- # invoice is due on issue, whereas a value of 30 represents that the customer has
33
- # 30 days to pay the invoice.
34
- #
35
- # @return [Integer]
36
- required :net_terms, Integer
37
-
38
29
  # @!attribute customer_id
39
30
  # The id of the `Customer` to create this invoice for. One of `customer_id` and
40
31
  # `external_customer_id` are required.
@@ -69,6 +60,15 @@ module Orb
69
60
  # @return [Hash{Symbol=>String, nil}, nil]
70
61
  optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
71
62
 
63
+ # @!attribute net_terms
64
+ # Determines the difference between the invoice issue date for subscription
65
+ # invoices as the date that they are due. A value of '0' here represents that the
66
+ # invoice is due on issue, whereas a value of 30 represents that the customer has
67
+ # 30 days to pay the invoice.
68
+ #
69
+ # @return [Integer, nil]
70
+ optional :net_terms, Integer, nil?: true
71
+
72
72
  # @!attribute will_auto_issue
73
73
  # When true, this invoice will be submitted for issuance upon creation. When
74
74
  # false, the resulting invoice will require manual review to issue. Defaulted to
@@ -77,7 +77,7 @@ module Orb
77
77
  # @return [Boolean, nil]
78
78
  optional :will_auto_issue, Orb::Internal::Type::Boolean
79
79
 
80
- # @!method initialize(currency:, invoice_date:, line_items:, net_terms:, customer_id: nil, discount: nil, external_customer_id: nil, memo: nil, metadata: nil, will_auto_issue: nil, request_options: {})
80
+ # @!method initialize(currency:, invoice_date:, line_items:, customer_id: nil, discount: nil, external_customer_id: nil, memo: nil, metadata: nil, net_terms: nil, will_auto_issue: nil, request_options: {})
81
81
  # Some parameter documentations has been truncated, see
82
82
  # {Orb::Models::InvoiceCreateParams} for more details.
83
83
  #
@@ -87,8 +87,6 @@ module Orb
87
87
  #
88
88
  # @param line_items [Array<Orb::Models::InvoiceCreateParams::LineItem>]
89
89
  #
90
- # @param net_terms [Integer] Determines the difference between the invoice issue date for subscription invoic
91
- #
92
90
  # @param customer_id [String, nil] The id of the `Customer` to create this invoice for. One of `customer_id` and `e
93
91
  #
94
92
  # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil] An optional discount to attach to the invoice.
@@ -99,6 +97,8 @@ module Orb
99
97
  #
100
98
  # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
101
99
  #
100
+ # @param net_terms [Integer, nil] Determines the difference between the invoice issue date for subscription invoic
101
+ #
102
102
  # @param will_auto_issue [Boolean] When true, this invoice will be submitted for issuance upon creation. When false
103
103
  #
104
104
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
@@ -8,7 +8,7 @@ module Orb
8
8
  include Orb::Internal::Type::RequestParameters
9
9
 
10
10
  # @!attribute currency
11
- # The currency to use.
11
+ # The currency or custom pricing unit to use.
12
12
  #
13
13
  # @return [String, nil]
14
14
  optional :currency, String, nil?: true
@@ -38,7 +38,7 @@ module Orb
38
38
  # Some parameter documentations has been truncated, see
39
39
  # {Orb::Models::SubscriptionFetchCostsParams} for more details.
40
40
  #
41
- # @param currency [String, nil] The currency to use.
41
+ # @param currency [String, nil] The currency or custom pricing unit to use.
42
42
  #
43
43
  # @param timeframe_end [Time, nil] Costs returned are exclusive of `timeframe_end`.
44
44
  #
@@ -129,7 +129,7 @@ module Orb
129
129
  #
130
130
  # @param customer_id [String]
131
131
  #
132
- # @param currency [String, nil] The currency to use.
132
+ # @param currency [String, nil] The currency or custom pricing unit to use.
133
133
  #
134
134
  # @param timeframe_end [Time, nil] Costs returned are exclusive of `timeframe_end`.
135
135
  #
@@ -278,7 +278,7 @@ module Orb
278
278
  #
279
279
  # @param external_customer_id [String]
280
280
  #
281
- # @param currency [String, nil] The currency to use.
281
+ # @param currency [String, nil] The currency or custom pricing unit to use.
282
282
  #
283
283
  # @param timeframe_end [Time, nil] Costs returned are exclusive of `timeframe_end`.
284
284
  #
@@ -109,7 +109,7 @@ module Orb
109
109
  #
110
110
  # @param email_delivery [Boolean, nil]
111
111
  #
112
- # @param external_customer_id [String, nil] The external customer ID. This can only be set if empty and the customer has no
112
+ # @param external_customer_id [String, nil] The external customer ID. This can only be set if the customer has no existing e
113
113
  #
114
114
  # @param hierarchy [Orb::Models::CustomerHierarchyConfig, nil] The hierarchical relationships for this customer.
115
115
  #
@@ -345,7 +345,7 @@ module Orb
345
345
  #
346
346
  # @param email_delivery [Boolean, nil]
347
347
  #
348
- # @param external_customer_id [String, nil] The external customer ID. This can only be set if empty and the customer has no
348
+ # @param external_customer_id [String, nil] The external customer ID. This can only be set if the customer has no existing e
349
349
  #
350
350
  # @param hierarchy [Orb::Models::CustomerHierarchyConfig, nil] The hierarchical relationships for this customer.
351
351
  #
@@ -8,7 +8,7 @@ module Orb
8
8
  #
9
9
  # This endpoint is used to create a one-off invoice for a customer.
10
10
  #
11
- # @overload create(currency:, invoice_date:, line_items:, net_terms:, customer_id: nil, discount: nil, external_customer_id: nil, memo: nil, metadata: nil, will_auto_issue: nil, request_options: {})
11
+ # @overload create(currency:, invoice_date:, line_items:, customer_id: nil, discount: nil, external_customer_id: nil, memo: nil, metadata: nil, net_terms: nil, will_auto_issue: nil, request_options: {})
12
12
  #
13
13
  # @param currency [String] An ISO 4217 currency string. Must be the same as the customer's currency if it i
14
14
  #
@@ -16,8 +16,6 @@ module Orb
16
16
  #
17
17
  # @param line_items [Array<Orb::Models::InvoiceCreateParams::LineItem>]
18
18
  #
19
- # @param net_terms [Integer] Determines the difference between the invoice issue date for subscription invoic
20
- #
21
19
  # @param customer_id [String, nil] The id of the `Customer` to create this invoice for. One of `customer_id` and `e
22
20
  #
23
21
  # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil] An optional discount to attach to the invoice.
@@ -28,6 +26,8 @@ module Orb
28
26
  #
29
27
  # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
30
28
  #
29
+ # @param net_terms [Integer, nil] Determines the difference between the invoice issue date for subscription invoic
30
+ #
31
31
  # @param will_auto_issue [Boolean] When true, this invoice will be submitted for issuance upon creation. When false
32
32
  #
33
33
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
@@ -43,11 +43,12 @@ module Orb
43
43
  # Some parameter documentations has been truncated, see
44
44
  # {Orb::Models::InvoiceUpdateParams} for more details.
45
45
  #
46
- # This endpoint allows you to update the `metadata` property on an invoice. If you
47
- # pass null for the metadata value, it will clear any existing metadata for that
48
- # invoice.
46
+ # This endpoint allows you to update the `metadata`, `net_terms`, and `due_date`
47
+ # properties on an invoice. If you pass null for the metadata value, it will clear
48
+ # any existing metadata for that invoice.
49
49
  #
50
- # `metadata` can be modified regardless of invoice state.
50
+ # `metadata` can be modified regardless of invoice state. `net_terms` and
51
+ # `due_date` can only be modified if the invoice is in a `draft` state.
51
52
  #
52
53
  # @overload update(invoice_id, metadata: nil, request_options: {})
53
54
  #
@@ -568,7 +568,7 @@ module Orb
568
568
  #
569
569
  # @param subscription_id [String]
570
570
  #
571
- # @param currency [String, nil] The currency to use.
571
+ # @param currency [String, nil] The currency or custom pricing unit to use.
572
572
  #
573
573
  # @param timeframe_end [Time, nil] Costs returned are exclusive of `timeframe_end`.
574
574
  #
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.8.0"
4
+ VERSION = "1.10.0"
5
5
  end
@@ -51,8 +51,11 @@ module Orb
51
51
  sig { returns(T.nilable(T::Boolean)) }
52
52
  attr_accessor :email_delivery
53
53
 
54
- # The external customer ID. This can only be set if empty and the customer has no
55
- # past or current subscriptions.
54
+ # The external customer ID. This can only be set if the customer has no existing
55
+ # external customer ID. Since this action may change usage quantities for all
56
+ # existing subscriptions, it is disallowed if the customer has issued invoices
57
+ # with usage line items and subject to the same restrictions as backdated
58
+ # subscription creation.
56
59
  sig { returns(T.nilable(String)) }
57
60
  attr_accessor :external_customer_id
58
61
 
@@ -289,8 +292,11 @@ module Orb
289
292
  # A valid customer email, to be used for invoicing and notifications.
290
293
  email: nil,
291
294
  email_delivery: nil,
292
- # The external customer ID. This can only be set if empty and the customer has no
293
- # past or current subscriptions.
295
+ # The external customer ID. This can only be set if the customer has no existing
296
+ # external customer ID. Since this action may change usage quantities for all
297
+ # existing subscriptions, it is disallowed if the customer has issued invoices
298
+ # with usage line items and subject to the same restrictions as backdated
299
+ # subscription creation.
294
300
  external_customer_id: nil,
295
301
  # The hierarchical relationships for this customer.
296
302
  hierarchy: nil,
@@ -51,8 +51,11 @@ module Orb
51
51
  sig { returns(T.nilable(T::Boolean)) }
52
52
  attr_accessor :email_delivery
53
53
 
54
- # The external customer ID. This can only be set if empty and the customer has no
55
- # past or current subscriptions.
54
+ # The external customer ID. This can only be set if the customer has no existing
55
+ # external customer ID. Since this action may change usage quantities for all
56
+ # existing subscriptions, it is disallowed if the customer has issued invoices
57
+ # with usage line items and subject to the same restrictions as backdated
58
+ # subscription creation.
56
59
  sig { returns(T.nilable(String)) }
57
60
  attr_accessor :external_customer_id
58
61
 
@@ -283,8 +286,11 @@ module Orb
283
286
  # A valid customer email, to be used for invoicing and notifications.
284
287
  email: nil,
285
288
  email_delivery: nil,
286
- # The external customer ID. This can only be set if empty and the customer has no
287
- # past or current subscriptions.
289
+ # The external customer ID. This can only be set if the customer has no existing
290
+ # external customer ID. Since this action may change usage quantities for all
291
+ # existing subscriptions, it is disallowed if the customer has issued invoices
292
+ # with usage line items and subject to the same restrictions as backdated
293
+ # subscription creation.
288
294
  external_customer_id: nil,
289
295
  # The hierarchical relationships for this customer.
290
296
  hierarchy: nil,
@@ -15,7 +15,7 @@ module Orb
15
15
  )
16
16
  end
17
17
 
18
- # The currency to use.
18
+ # The currency or custom pricing unit to use.
19
19
  sig { returns(T.nilable(String)) }
20
20
  attr_accessor :currency
21
21
 
@@ -53,7 +53,7 @@ module Orb
53
53
  ).returns(T.attached_class)
54
54
  end
55
55
  def self.new(
56
- # The currency to use.
56
+ # The currency or custom pricing unit to use.
57
57
  currency: nil,
58
58
  # Costs returned are exclusive of `timeframe_end`.
59
59
  timeframe_end: nil,
@@ -12,7 +12,7 @@ module Orb
12
12
  T.any(Orb::Customers::CostListParams, Orb::Internal::AnyHash)
13
13
  end
14
14
 
15
- # The currency to use.
15
+ # The currency or custom pricing unit to use.
16
16
  sig { returns(T.nilable(String)) }
17
17
  attr_accessor :currency
18
18
 
@@ -44,7 +44,7 @@ module Orb
44
44
  ).returns(T.attached_class)
45
45
  end
46
46
  def self.new(
47
- # The currency to use.
47
+ # The currency or custom pricing unit to use.
48
48
  currency: nil,
49
49
  # Costs returned are exclusive of `timeframe_end`.
50
50
  timeframe_end: nil,
@@ -242,7 +242,7 @@ module Orb
242
242
  # The net terms determines the difference between the invoice date and the issue
243
243
  # date for the invoice. If you intend the invoice to be due on issue, set this
244
244
  # to 0.
245
- sig { returns(Integer) }
245
+ sig { returns(T.nilable(Integer)) }
246
246
  attr_accessor :net_terms
247
247
 
248
248
  # An ISO 8601 format date that denotes when this invoice should be dated in the
@@ -276,7 +276,7 @@ module Orb
276
276
  sig do
277
277
  params(
278
278
  auto_collection: T::Boolean,
279
- net_terms: Integer,
279
+ net_terms: T.nilable(Integer),
280
280
  invoice_date:
281
281
  T.nilable(
282
282
  Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::InvoiceDate::Variants
@@ -309,7 +309,7 @@ module Orb
309
309
  override.returns(
310
310
  {
311
311
  auto_collection: T::Boolean,
312
- net_terms: Integer,
312
+ net_terms: T.nilable(Integer),
313
313
  invoice_date:
314
314
  T.nilable(
315
315
  Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::InvoiceDate::Variants
@@ -242,7 +242,7 @@ module Orb
242
242
  # The net terms determines the difference between the invoice date and the issue
243
243
  # date for the invoice. If you intend the invoice to be due on issue, set this
244
244
  # to 0.
245
- sig { returns(Integer) }
245
+ sig { returns(T.nilable(Integer)) }
246
246
  attr_accessor :net_terms
247
247
 
248
248
  # An ISO 8601 format date that denotes when this invoice should be dated in the
@@ -276,7 +276,7 @@ module Orb
276
276
  sig do
277
277
  params(
278
278
  auto_collection: T::Boolean,
279
- net_terms: Integer,
279
+ net_terms: T.nilable(Integer),
280
280
  invoice_date:
281
281
  T.nilable(
282
282
  Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::InvoiceDate::Variants
@@ -309,7 +309,7 @@ module Orb
309
309
  override.returns(
310
310
  {
311
311
  auto_collection: T::Boolean,
312
- net_terms: Integer,
312
+ net_terms: T.nilable(Integer),
313
313
  invoice_date:
314
314
  T.nilable(
315
315
  Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::InvoiceDate::Variants
@@ -22,13 +22,6 @@ module Orb
22
22
  sig { returns(T::Array[Orb::InvoiceCreateParams::LineItem]) }
23
23
  attr_accessor :line_items
24
24
 
25
- # Determines the difference between the invoice issue date for subscription
26
- # invoices as the date that they are due. A value of '0' here represents that the
27
- # invoice is due on issue, whereas a value of 30 represents that the customer has
28
- # 30 days to pay the invoice.
29
- sig { returns(Integer) }
30
- attr_accessor :net_terms
31
-
32
25
  # The id of the `Customer` to create this invoice for. One of `customer_id` and
33
26
  # `external_customer_id` are required.
34
27
  sig { returns(T.nilable(String)) }
@@ -64,6 +57,13 @@ module Orb
64
57
  sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
65
58
  attr_accessor :metadata
66
59
 
60
+ # Determines the difference between the invoice issue date for subscription
61
+ # invoices as the date that they are due. A value of '0' here represents that the
62
+ # invoice is due on issue, whereas a value of 30 represents that the customer has
63
+ # 30 days to pay the invoice.
64
+ sig { returns(T.nilable(Integer)) }
65
+ attr_accessor :net_terms
66
+
67
67
  # When true, this invoice will be submitted for issuance upon creation. When
68
68
  # false, the resulting invoice will require manual review to issue. Defaulted to
69
69
  # false.
@@ -78,7 +78,6 @@ module Orb
78
78
  currency: String,
79
79
  invoice_date: Time,
80
80
  line_items: T::Array[Orb::InvoiceCreateParams::LineItem::OrHash],
81
- net_terms: Integer,
82
81
  customer_id: T.nilable(String),
83
82
  discount:
84
83
  T.nilable(
@@ -92,6 +91,7 @@ module Orb
92
91
  external_customer_id: T.nilable(String),
93
92
  memo: T.nilable(String),
94
93
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
94
+ net_terms: T.nilable(Integer),
95
95
  will_auto_issue: T::Boolean,
96
96
  request_options: Orb::RequestOptions::OrHash
97
97
  ).returns(T.attached_class)
@@ -104,11 +104,6 @@ module Orb
104
104
  # set to the current time in the customer's timezone.
105
105
  invoice_date:,
106
106
  line_items:,
107
- # Determines the difference between the invoice issue date for subscription
108
- # invoices as the date that they are due. A value of '0' here represents that the
109
- # invoice is due on issue, whereas a value of 30 represents that the customer has
110
- # 30 days to pay the invoice.
111
- net_terms:,
112
107
  # The id of the `Customer` to create this invoice for. One of `customer_id` and
113
108
  # `external_customer_id` are required.
114
109
  customer_id: nil,
@@ -123,6 +118,11 @@ module Orb
123
118
  # by setting the value to `null`, and the entire metadata mapping can be cleared
124
119
  # by setting `metadata` to `null`.
125
120
  metadata: nil,
121
+ # Determines the difference between the invoice issue date for subscription
122
+ # invoices as the date that they are due. A value of '0' here represents that the
123
+ # invoice is due on issue, whereas a value of 30 represents that the customer has
124
+ # 30 days to pay the invoice.
125
+ net_terms: nil,
126
126
  # When true, this invoice will be submitted for issuance upon creation. When
127
127
  # false, the resulting invoice will require manual review to issue. Defaulted to
128
128
  # false.
@@ -137,7 +137,6 @@ module Orb
137
137
  currency: String,
138
138
  invoice_date: Time,
139
139
  line_items: T::Array[Orb::InvoiceCreateParams::LineItem],
140
- net_terms: Integer,
141
140
  customer_id: T.nilable(String),
142
141
  discount:
143
142
  T.nilable(
@@ -151,6 +150,7 @@ module Orb
151
150
  external_customer_id: T.nilable(String),
152
151
  memo: T.nilable(String),
153
152
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
153
+ net_terms: T.nilable(Integer),
154
154
  will_auto_issue: T::Boolean,
155
155
  request_options: Orb::RequestOptions
156
156
  }
@@ -11,7 +11,7 @@ module Orb
11
11
  T.any(Orb::SubscriptionFetchCostsParams, Orb::Internal::AnyHash)
12
12
  end
13
13
 
14
- # The currency to use.
14
+ # The currency or custom pricing unit to use.
15
15
  sig { returns(T.nilable(String)) }
16
16
  attr_accessor :currency
17
17
 
@@ -45,7 +45,7 @@ module Orb
45
45
  ).returns(T.attached_class)
46
46
  end
47
47
  def self.new(
48
- # The currency to use.
48
+ # The currency or custom pricing unit to use.
49
49
  currency: nil,
50
50
  # Costs returned are exclusive of `timeframe_end`.
51
51
  timeframe_end: nil,
@@ -134,7 +134,7 @@ module Orb
134
134
  end
135
135
  def list(
136
136
  customer_id,
137
- # The currency to use.
137
+ # The currency or custom pricing unit to use.
138
138
  currency: nil,
139
139
  # Costs returned are exclusive of `timeframe_end`.
140
140
  timeframe_end: nil,
@@ -281,7 +281,7 @@ module Orb
281
281
  end
282
282
  def list_by_external_id(
283
283
  external_customer_id,
284
- # The currency to use.
284
+ # The currency or custom pricing unit to use.
285
285
  currency: nil,
286
286
  # Costs returned are exclusive of `timeframe_end`.
287
287
  timeframe_end: nil,
@@ -266,8 +266,11 @@ module Orb
266
266
  # A valid customer email, to be used for invoicing and notifications.
267
267
  email: nil,
268
268
  email_delivery: nil,
269
- # The external customer ID. This can only be set if empty and the customer has no
270
- # past or current subscriptions.
269
+ # The external customer ID. This can only be set if the customer has no existing
270
+ # external customer ID. Since this action may change usage quantities for all
271
+ # existing subscriptions, it is disallowed if the customer has issued invoices
272
+ # with usage line items and subject to the same restrictions as backdated
273
+ # subscription creation.
271
274
  external_customer_id: nil,
272
275
  # The hierarchical relationships for this customer.
273
276
  hierarchy: nil,
@@ -571,8 +574,11 @@ module Orb
571
574
  # A valid customer email, to be used for invoicing and notifications.
572
575
  email: nil,
573
576
  email_delivery: nil,
574
- # The external customer ID. This can only be set if empty and the customer has no
575
- # past or current subscriptions.
577
+ # The external customer ID. This can only be set if the customer has no existing
578
+ # external customer ID. Since this action may change usage quantities for all
579
+ # existing subscriptions, it is disallowed if the customer has issued invoices
580
+ # with usage line items and subject to the same restrictions as backdated
581
+ # subscription creation.
576
582
  external_customer_id: nil,
577
583
  # The hierarchical relationships for this customer.
578
584
  hierarchy: nil,
@@ -9,7 +9,6 @@ module Orb
9
9
  currency: String,
10
10
  invoice_date: Time,
11
11
  line_items: T::Array[Orb::InvoiceCreateParams::LineItem::OrHash],
12
- net_terms: Integer,
13
12
  customer_id: T.nilable(String),
14
13
  discount:
15
14
  T.nilable(
@@ -23,6 +22,7 @@ module Orb
23
22
  external_customer_id: T.nilable(String),
24
23
  memo: T.nilable(String),
25
24
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
25
+ net_terms: T.nilable(Integer),
26
26
  will_auto_issue: T::Boolean,
27
27
  request_options: Orb::RequestOptions::OrHash
28
28
  ).returns(Orb::Invoice)
@@ -35,11 +35,6 @@ module Orb
35
35
  # set to the current time in the customer's timezone.
36
36
  invoice_date:,
37
37
  line_items:,
38
- # Determines the difference between the invoice issue date for subscription
39
- # invoices as the date that they are due. A value of '0' here represents that the
40
- # invoice is due on issue, whereas a value of 30 represents that the customer has
41
- # 30 days to pay the invoice.
42
- net_terms:,
43
38
  # The id of the `Customer` to create this invoice for. One of `customer_id` and
44
39
  # `external_customer_id` are required.
45
40
  customer_id: nil,
@@ -54,6 +49,11 @@ module Orb
54
49
  # by setting the value to `null`, and the entire metadata mapping can be cleared
55
50
  # by setting `metadata` to `null`.
56
51
  metadata: nil,
52
+ # Determines the difference between the invoice issue date for subscription
53
+ # invoices as the date that they are due. A value of '0' here represents that the
54
+ # invoice is due on issue, whereas a value of 30 represents that the customer has
55
+ # 30 days to pay the invoice.
56
+ net_terms: nil,
57
57
  # When true, this invoice will be submitted for issuance upon creation. When
58
58
  # false, the resulting invoice will require manual review to issue. Defaulted to
59
59
  # false.
@@ -62,11 +62,12 @@ module Orb
62
62
  )
63
63
  end
64
64
 
65
- # This endpoint allows you to update the `metadata` property on an invoice. If you
66
- # pass null for the metadata value, it will clear any existing metadata for that
67
- # invoice.
65
+ # This endpoint allows you to update the `metadata`, `net_terms`, and `due_date`
66
+ # properties on an invoice. If you pass null for the metadata value, it will clear
67
+ # any existing metadata for that invoice.
68
68
  #
69
- # `metadata` can be modified regardless of invoice state.
69
+ # `metadata` can be modified regardless of invoice state. `net_terms` and
70
+ # `due_date` can only be modified if the invoice is in a `draft` state.
70
71
  sig do
71
72
  params(
72
73
  invoice_id: String,
@@ -611,7 +611,7 @@ module Orb
611
611
  end
612
612
  def fetch_costs(
613
613
  subscription_id,
614
- # The currency to use.
614
+ # The currency or custom pricing unit to use.
615
615
  currency: nil,
616
616
  # Costs returned are exclusive of `timeframe_end`.
617
617
  timeframe_end: nil,
@@ -92,7 +92,7 @@ module Orb
92
92
  type invoice_settings =
93
93
  {
94
94
  auto_collection: bool,
95
- net_terms: Integer,
95
+ net_terms: Integer?,
96
96
  invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::invoice_date?,
97
97
  memo: String?,
98
98
  require_successful_payment: bool
@@ -101,7 +101,7 @@ module Orb
101
101
  class InvoiceSettings < Orb::Internal::Type::BaseModel
102
102
  attr_accessor auto_collection: bool
103
103
 
104
- attr_accessor net_terms: Integer
104
+ attr_accessor net_terms: Integer?
105
105
 
106
106
  attr_accessor invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::invoice_date?
107
107
 
@@ -113,7 +113,7 @@ module Orb
113
113
 
114
114
  def initialize: (
115
115
  auto_collection: bool,
116
- net_terms: Integer,
116
+ net_terms: Integer?,
117
117
  ?invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::invoice_date?,
118
118
  ?memo: String?,
119
119
  ?require_successful_payment: bool
@@ -121,7 +121,7 @@ module Orb
121
121
 
122
122
  def to_hash: -> {
123
123
  auto_collection: bool,
124
- net_terms: Integer,
124
+ net_terms: Integer?,
125
125
  invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::invoice_date?,
126
126
  memo: String?,
127
127
  require_successful_payment: bool
@@ -92,7 +92,7 @@ module Orb
92
92
  type invoice_settings =
93
93
  {
94
94
  auto_collection: bool,
95
- net_terms: Integer,
95
+ net_terms: Integer?,
96
96
  invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::invoice_date?,
97
97
  memo: String?,
98
98
  require_successful_payment: bool
@@ -101,7 +101,7 @@ module Orb
101
101
  class InvoiceSettings < Orb::Internal::Type::BaseModel
102
102
  attr_accessor auto_collection: bool
103
103
 
104
- attr_accessor net_terms: Integer
104
+ attr_accessor net_terms: Integer?
105
105
 
106
106
  attr_accessor invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::invoice_date?
107
107
 
@@ -113,7 +113,7 @@ module Orb
113
113
 
114
114
  def initialize: (
115
115
  auto_collection: bool,
116
- net_terms: Integer,
116
+ net_terms: Integer?,
117
117
  ?invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::invoice_date?,
118
118
  ?memo: String?,
119
119
  ?require_successful_payment: bool
@@ -121,7 +121,7 @@ module Orb
121
121
 
122
122
  def to_hash: -> {
123
123
  auto_collection: bool,
124
- net_terms: Integer,
124
+ net_terms: Integer?,
125
125
  invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::invoice_date?,
126
126
  memo: String?,
127
127
  require_successful_payment: bool
@@ -5,12 +5,12 @@ module Orb
5
5
  currency: String,
6
6
  invoice_date: Time,
7
7
  line_items: ::Array[Orb::InvoiceCreateParams::LineItem],
8
- net_terms: Integer,
9
8
  customer_id: String?,
10
9
  discount: Orb::Models::discount?,
11
10
  external_customer_id: String?,
12
11
  memo: String?,
13
12
  metadata: ::Hash[Symbol, String?]?,
13
+ net_terms: Integer?,
14
14
  will_auto_issue: bool
15
15
  }
16
16
  & Orb::Internal::Type::request_parameters
@@ -25,8 +25,6 @@ module Orb
25
25
 
26
26
  attr_accessor line_items: ::Array[Orb::InvoiceCreateParams::LineItem]
27
27
 
28
- attr_accessor net_terms: Integer
29
-
30
28
  attr_accessor customer_id: String?
31
29
 
32
30
  attr_accessor discount: Orb::Models::discount?
@@ -37,6 +35,8 @@ module Orb
37
35
 
38
36
  attr_accessor metadata: ::Hash[Symbol, String?]?
39
37
 
38
+ attr_accessor net_terms: Integer?
39
+
40
40
  attr_reader will_auto_issue: bool?
41
41
 
42
42
  def will_auto_issue=: (bool) -> bool
@@ -45,12 +45,12 @@ module Orb
45
45
  currency: String,
46
46
  invoice_date: Time,
47
47
  line_items: ::Array[Orb::InvoiceCreateParams::LineItem],
48
- net_terms: Integer,
49
48
  ?customer_id: String?,
50
49
  ?discount: Orb::Models::discount?,
51
50
  ?external_customer_id: String?,
52
51
  ?memo: String?,
53
52
  ?metadata: ::Hash[Symbol, String?]?,
53
+ ?net_terms: Integer?,
54
54
  ?will_auto_issue: bool,
55
55
  ?request_options: Orb::request_opts
56
56
  ) -> void
@@ -59,12 +59,12 @@ module Orb
59
59
  currency: String,
60
60
  invoice_date: Time,
61
61
  line_items: ::Array[Orb::InvoiceCreateParams::LineItem],
62
- net_terms: Integer,
63
62
  customer_id: String?,
64
63
  discount: Orb::Models::discount?,
65
64
  external_customer_id: String?,
66
65
  memo: String?,
67
66
  metadata: ::Hash[Symbol, String?]?,
67
+ net_terms: Integer?,
68
68
  will_auto_issue: bool,
69
69
  request_options: Orb::RequestOptions
70
70
  }
@@ -5,12 +5,12 @@ module Orb
5
5
  currency: String,
6
6
  invoice_date: Time,
7
7
  line_items: ::Array[Orb::InvoiceCreateParams::LineItem],
8
- net_terms: Integer,
9
8
  ?customer_id: String?,
10
9
  ?discount: Orb::Models::discount?,
11
10
  ?external_customer_id: String?,
12
11
  ?memo: String?,
13
12
  ?metadata: ::Hash[Symbol, String?]?,
13
+ ?net_terms: Integer?,
14
14
  ?will_auto_issue: bool,
15
15
  ?request_options: Orb::request_opts
16
16
  ) -> Orb::Invoice
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orb-billing
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-07-17 00:00:00.000000000 Z
11
+ date: 2025-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool