orb-billing 1.4.0 → 1.5.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 +4 -4
- data/CHANGELOG.md +13 -0
- data/README.md +1 -1
- data/lib/orb/models/credit_note.rb +17 -1
- data/lib/orb/models/credit_note_create_params.rb +53 -2
- data/lib/orb/models/events/backfill_create_params.rb +2 -2
- data/lib/orb/models/mutated_subscription.rb +9 -6
- data/lib/orb/models/price_evaluate_multiple_params.rb +9 -1
- data/lib/orb/models/price_evaluate_multiple_response.rb +9 -1
- data/lib/orb/models/price_evaluate_preview_events_params.rb +9 -1
- data/lib/orb/models/price_evaluate_preview_events_response.rb +9 -1
- data/lib/orb/models/subscription.rb +9 -6
- data/lib/orb/models/subscription_price_intervals_params.rb +10 -10
- data/lib/orb/resources/credit_notes.rb +33 -1
- data/lib/orb/resources/customers/costs.rb +16 -16
- data/lib/orb/resources/customers/credits/ledger.rb +4 -4
- data/lib/orb/resources/invoices.rb +1 -1
- data/lib/orb/resources/subscriptions.rb +1 -1
- data/lib/orb/version.rb +1 -1
- data/rbi/orb/models/credit_note.rbi +19 -3
- data/rbi/orb/models/credit_note_create_params.rbi +69 -5
- data/rbi/orb/models/events/backfill_create_params.rbi +4 -4
- data/rbi/orb/models/mutated_subscription.rbi +12 -6
- data/rbi/orb/models/price_evaluate_multiple_params.rbi +8 -0
- data/rbi/orb/models/price_evaluate_multiple_response.rbi +8 -0
- data/rbi/orb/models/price_evaluate_preview_events_params.rbi +8 -0
- data/rbi/orb/models/price_evaluate_preview_events_response.rbi +8 -0
- data/rbi/orb/models/subscription.rbi +12 -6
- data/rbi/orb/models/subscription_price_intervals_params.rbi +12 -12
- data/rbi/orb/resources/credit_notes.rbi +37 -0
- data/rbi/orb/resources/customers/costs.rbi +16 -16
- data/rbi/orb/resources/customers/credits/ledger.rbi +4 -4
- data/rbi/orb/resources/events/backfills.rbi +2 -2
- data/rbi/orb/resources/invoices.rbi +1 -1
- data/rbi/orb/resources/subscriptions.rbi +1 -1
- data/sig/orb/models/credit_note.rbs +13 -3
- data/sig/orb/models/credit_note_create_params.rbs +34 -4
- data/sig/orb/models/price_evaluate_multiple_params.rbs +5 -0
- data/sig/orb/models/price_evaluate_multiple_response.rbs +5 -0
- data/sig/orb/models/price_evaluate_preview_events_params.rbs +5 -0
- data/sig/orb/models/price_evaluate_preview_events_response.rbs +5 -0
- data/sig/orb/resources/credit_notes.rbs +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee6b80e95c43c4a91835db318552bc9cf30795f853bb35d18a7a47f4b2bc4b98
|
4
|
+
data.tar.gz: c32cd239fd0486f158503b5228a38bd78fa7f75feca50955436e71205bdca207
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7d87f338f886d159c571a2ce196fd2ab85f9f1a6e43c24f17f16f809f7de3c0e8784e7ff72cab0415b50f55e8f13529d2409742836d3381e5626ee86034a322
|
7
|
+
data.tar.gz: 0fbd5eb4c79d4b8e5f98b10cb310dbaf1c90ff4e5b1ec6d9a31867156d536b3c0a20dc1505027e7f668e0a177cfca1048225c86022b92f723c14d91482605a8d
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 1.5.0 (2025-07-16)
|
4
|
+
|
5
|
+
Full Changelog: [v1.4.0...v1.5.0](https://github.com/orbcorp/orb-ruby/compare/v1.4.0...v1.5.0)
|
6
|
+
|
7
|
+
### Features
|
8
|
+
|
9
|
+
* **api:** api update ([6babc11](https://github.com/orbcorp/orb-ruby/commit/6babc11fcfb50389ab5139351ef28d14a5a08cab))
|
10
|
+
|
11
|
+
|
12
|
+
### Chores
|
13
|
+
|
14
|
+
* **internal:** version bump ([acea921](https://github.com/orbcorp/orb-ruby/commit/acea9216388dc9412559385cd17ab64787780568))
|
15
|
+
|
3
16
|
## 1.4.0 (2025-07-08)
|
4
17
|
|
5
18
|
Full Changelog: [v1.3.0...v1.4.0](https://github.com/orbcorp/orb-ruby/compare/v1.3.0...v1.4.0)
|
data/README.md
CHANGED
@@ -181,7 +181,19 @@ module Orb
|
|
181
181
|
# @return [Array<Orb::Models::CreditNote::LineItem::Discount>, nil]
|
182
182
|
optional :discounts, -> { Orb::Internal::Type::ArrayOf[Orb::CreditNote::LineItem::Discount] }
|
183
183
|
|
184
|
-
# @!
|
184
|
+
# @!attribute end_time_exclusive
|
185
|
+
# The end time of the service period for this credit note line item.
|
186
|
+
#
|
187
|
+
# @return [Time, nil]
|
188
|
+
optional :end_time_exclusive, Time, nil?: true
|
189
|
+
|
190
|
+
# @!attribute start_time_inclusive
|
191
|
+
# The start time of the service period for this credit note line item.
|
192
|
+
#
|
193
|
+
# @return [Time, nil]
|
194
|
+
optional :start_time_inclusive, Time, nil?: true
|
195
|
+
|
196
|
+
# @!method initialize(id:, amount:, item_id:, name:, quantity:, subtotal:, tax_amounts:, discounts: nil, end_time_exclusive: nil, start_time_inclusive: nil)
|
185
197
|
# @param id [String] The Orb id of this resource.
|
186
198
|
#
|
187
199
|
# @param amount [String] The amount of the line item, including any line item minimums and discounts.
|
@@ -197,6 +209,10 @@ module Orb
|
|
197
209
|
# @param tax_amounts [Array<Orb::Models::TaxAmount>] Any tax amounts applied onto the line item.
|
198
210
|
#
|
199
211
|
# @param discounts [Array<Orb::Models::CreditNote::LineItem::Discount>] Any line item discounts from the invoice's line item.
|
212
|
+
#
|
213
|
+
# @param end_time_exclusive [Time, nil] The end time of the service period for this credit note line item.
|
214
|
+
#
|
215
|
+
# @param start_time_inclusive [Time, nil] The start time of the service period for this credit note line item.
|
200
216
|
|
201
217
|
class Discount < Orb::Internal::Type::BaseModel
|
202
218
|
# @!attribute id
|
@@ -18,19 +18,44 @@ module Orb
|
|
18
18
|
# @return [Symbol, Orb::Models::CreditNoteCreateParams::Reason]
|
19
19
|
required :reason, enum: -> { Orb::CreditNoteCreateParams::Reason }
|
20
20
|
|
21
|
+
# @!attribute end_date
|
22
|
+
# A date string to specify the global credit note service period end date in the
|
23
|
+
# customer's timezone. This will be applied to all line items that don't have
|
24
|
+
# their own individual service periods specified. If not provided, line items will
|
25
|
+
# use their original invoice line item service periods. This date is inclusive.
|
26
|
+
#
|
27
|
+
# @return [Date, nil]
|
28
|
+
optional :end_date, Date, nil?: true
|
29
|
+
|
21
30
|
# @!attribute memo
|
22
31
|
# An optional memo to attach to the credit note.
|
23
32
|
#
|
24
33
|
# @return [String, nil]
|
25
34
|
optional :memo, String, nil?: true
|
26
35
|
|
27
|
-
# @!
|
36
|
+
# @!attribute start_date
|
37
|
+
# A date string to specify the global credit note service period start date in the
|
38
|
+
# customer's timezone. This will be applied to all line items that don't have
|
39
|
+
# their own individual service periods specified. If not provided, line items will
|
40
|
+
# use their original invoice line item service periods. This date is inclusive.
|
41
|
+
#
|
42
|
+
# @return [Date, nil]
|
43
|
+
optional :start_date, Date, nil?: true
|
44
|
+
|
45
|
+
# @!method initialize(line_items:, reason:, end_date: nil, memo: nil, start_date: nil, request_options: {})
|
46
|
+
# Some parameter documentations has been truncated, see
|
47
|
+
# {Orb::Models::CreditNoteCreateParams} for more details.
|
48
|
+
#
|
28
49
|
# @param line_items [Array<Orb::Models::CreditNoteCreateParams::LineItem>]
|
29
50
|
#
|
30
51
|
# @param reason [Symbol, Orb::Models::CreditNoteCreateParams::Reason] An optional reason for the credit note.
|
31
52
|
#
|
53
|
+
# @param end_date [Date, nil] A date string to specify the global credit note service period end date in the c
|
54
|
+
#
|
32
55
|
# @param memo [String, nil] An optional memo to attach to the credit note.
|
33
56
|
#
|
57
|
+
# @param start_date [Date, nil] A date string to specify the global credit note service period start date in the
|
58
|
+
#
|
34
59
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
35
60
|
|
36
61
|
class LineItem < Orb::Internal::Type::BaseModel
|
@@ -46,10 +71,36 @@ module Orb
|
|
46
71
|
# @return [String]
|
47
72
|
required :invoice_line_item_id, String
|
48
73
|
|
49
|
-
# @!
|
74
|
+
# @!attribute end_date
|
75
|
+
# A date string to specify this line item's credit note service period end date in
|
76
|
+
# the customer's timezone. If provided, this will be used for this specific line
|
77
|
+
# item. If not provided, will use the global end_date if available, otherwise
|
78
|
+
# defaults to the original invoice line item's end date. This date is inclusive.
|
79
|
+
#
|
80
|
+
# @return [Date, nil]
|
81
|
+
optional :end_date, Date, nil?: true
|
82
|
+
|
83
|
+
# @!attribute start_date
|
84
|
+
# A date string to specify this line item's credit note service period start date
|
85
|
+
# in the customer's timezone. If provided, this will be used for this specific
|
86
|
+
# line item. If not provided, will use the global start_date if available,
|
87
|
+
# otherwise defaults to the original invoice line item's start date. This date is
|
88
|
+
# inclusive.
|
89
|
+
#
|
90
|
+
# @return [Date, nil]
|
91
|
+
optional :start_date, Date, nil?: true
|
92
|
+
|
93
|
+
# @!method initialize(amount:, invoice_line_item_id:, end_date: nil, start_date: nil)
|
94
|
+
# Some parameter documentations has been truncated, see
|
95
|
+
# {Orb::Models::CreditNoteCreateParams::LineItem} for more details.
|
96
|
+
#
|
50
97
|
# @param amount [String] The total amount in the invoice's currency to credit this line item.
|
51
98
|
#
|
52
99
|
# @param invoice_line_item_id [String] The ID of the line item to credit.
|
100
|
+
#
|
101
|
+
# @param end_date [Date, nil] A date string to specify this line item's credit note service period end date in
|
102
|
+
#
|
103
|
+
# @param start_date [Date, nil] A date string to specify this line item's credit note service period start date
|
53
104
|
end
|
54
105
|
|
55
106
|
# An optional reason for the credit note.
|
@@ -10,7 +10,7 @@ module Orb
|
|
10
10
|
|
11
11
|
# @!attribute timeframe_end
|
12
12
|
# The (exclusive) end of the usage timeframe affected by this backfill. By
|
13
|
-
# default, Orb allows backfills up to
|
13
|
+
# default, Orb allows backfills up to 31 days in duration at a time. Reach out to
|
14
14
|
# discuss extending this limit and your use case.
|
15
15
|
#
|
16
16
|
# @return [Time]
|
@@ -18,7 +18,7 @@ module Orb
|
|
18
18
|
|
19
19
|
# @!attribute timeframe_start
|
20
20
|
# The (inclusive) start of the usage timeframe affected by this backfill. By
|
21
|
-
# default, Orb allows backfills up to
|
21
|
+
# default, Orb allows backfills up to 31 days in duration at a time. Reach out to
|
22
22
|
# discuss extending this limit and your use case.
|
23
23
|
#
|
24
24
|
# @return [Time]
|
@@ -98,7 +98,8 @@ module Orb
|
|
98
98
|
# @!attribute discount_intervals
|
99
99
|
# @deprecated
|
100
100
|
#
|
101
|
-
# The discount intervals for this subscription sorted by the start_date.
|
101
|
+
# The discount intervals for this subscription sorted by the start_date. This
|
102
|
+
# field is deprecated in favor of `adjustment_intervals`.
|
102
103
|
#
|
103
104
|
# @return [Array<Orb::Models::AmountDiscountInterval, Orb::Models::PercentageDiscountInterval, Orb::Models::UsageDiscountInterval>]
|
104
105
|
required :discount_intervals,
|
@@ -124,7 +125,8 @@ module Orb
|
|
124
125
|
# @!attribute maximum_intervals
|
125
126
|
# @deprecated
|
126
127
|
#
|
127
|
-
# The maximum intervals for this subscription sorted by the start_date.
|
128
|
+
# The maximum intervals for this subscription sorted by the start_date. This field
|
129
|
+
# is deprecated in favor of `adjustment_intervals`.
|
128
130
|
#
|
129
131
|
# @return [Array<Orb::Models::MaximumInterval>]
|
130
132
|
required :maximum_intervals, -> { Orb::Internal::Type::ArrayOf[Orb::MaximumInterval] }
|
@@ -141,7 +143,8 @@ module Orb
|
|
141
143
|
# @!attribute minimum_intervals
|
142
144
|
# @deprecated
|
143
145
|
#
|
144
|
-
# The minimum intervals for this subscription sorted by the start_date.
|
146
|
+
# The minimum intervals for this subscription sorted by the start_date. This field
|
147
|
+
# is deprecated in favor of `adjustment_intervals`.
|
145
148
|
#
|
146
149
|
# @return [Array<Orb::Models::MinimumInterval>]
|
147
150
|
required :minimum_intervals, -> { Orb::Internal::Type::ArrayOf[Orb::MinimumInterval] }
|
@@ -237,7 +240,7 @@ module Orb
|
|
237
240
|
#
|
238
241
|
# @param default_invoice_memo [String, nil] Determines the default memo on this subscriptions' invoices. Note that if this i
|
239
242
|
#
|
240
|
-
# @param discount_intervals [Array<Orb::Models::AmountDiscountInterval, Orb::Models::PercentageDiscountInterval, Orb::Models::UsageDiscountInterval>] The discount intervals for this subscription sorted by the start_date.
|
243
|
+
# @param discount_intervals [Array<Orb::Models::AmountDiscountInterval, Orb::Models::PercentageDiscountInterval, Orb::Models::UsageDiscountInterval>] The discount intervals for this subscription sorted by the start_date. This fiel
|
241
244
|
#
|
242
245
|
# @param end_date [Time, nil] The date Orb stops billing for this subscription.
|
243
246
|
#
|
@@ -245,11 +248,11 @@ module Orb
|
|
245
248
|
#
|
246
249
|
# @param invoicing_threshold [String, nil]
|
247
250
|
#
|
248
|
-
# @param maximum_intervals [Array<Orb::Models::MaximumInterval>] The maximum intervals for this subscription sorted by the start_date.
|
251
|
+
# @param maximum_intervals [Array<Orb::Models::MaximumInterval>] The maximum intervals for this subscription sorted by the start_date. This field
|
249
252
|
#
|
250
253
|
# @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t
|
251
254
|
#
|
252
|
-
# @param minimum_intervals [Array<Orb::Models::MinimumInterval>] The minimum intervals for this subscription sorted by the start_date.
|
255
|
+
# @param minimum_intervals [Array<Orb::Models::MinimumInterval>] The minimum intervals for this subscription sorted by the start_date. This field
|
253
256
|
#
|
254
257
|
# @param name [String] The name of the subscription.
|
255
258
|
#
|
@@ -52,6 +52,12 @@ module Orb
|
|
52
52
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
53
53
|
|
54
54
|
class PriceEvaluation < Orb::Internal::Type::BaseModel
|
55
|
+
# @!attribute external_price_id
|
56
|
+
# The external ID of a price to evaluate that exists in your Orb account.
|
57
|
+
#
|
58
|
+
# @return [String, nil]
|
59
|
+
optional :external_price_id, String, nil?: true
|
60
|
+
|
55
61
|
# @!attribute filter
|
56
62
|
# A boolean
|
57
63
|
# [computed property](/extensibility/advanced-metrics#computed-properties) used to
|
@@ -81,10 +87,12 @@ module Orb
|
|
81
87
|
# @return [String, nil]
|
82
88
|
optional :price_id, String, nil?: true
|
83
89
|
|
84
|
-
# @!method initialize(filter: nil, grouping_keys: nil, price: nil, price_id: nil)
|
90
|
+
# @!method initialize(external_price_id: nil, filter: nil, grouping_keys: nil, price: nil, price_id: nil)
|
85
91
|
# Some parameter documentations has been truncated, see
|
86
92
|
# {Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation} for more details.
|
87
93
|
#
|
94
|
+
# @param external_price_id [String, nil] The external ID of a price to evaluate that exists in your Orb account.
|
95
|
+
#
|
88
96
|
# @param filter [String, nil] A boolean [computed property](/extensibility/advanced-metrics#computed-propertie
|
89
97
|
#
|
90
98
|
# @param grouping_keys [Array<String>] Properties (or [computed properties](/extensibility/advanced-metrics#computed-pr
|
@@ -25,6 +25,12 @@ module Orb
|
|
25
25
|
# @return [Array<Orb::Models::EvaluatePriceGroup>]
|
26
26
|
required :price_groups, -> { Orb::Internal::Type::ArrayOf[Orb::EvaluatePriceGroup] }
|
27
27
|
|
28
|
+
# @!attribute external_price_id
|
29
|
+
# The external ID of the price
|
30
|
+
#
|
31
|
+
# @return [String, nil]
|
32
|
+
optional :external_price_id, String, nil?: true
|
33
|
+
|
28
34
|
# @!attribute inline_price_index
|
29
35
|
# The index of the inline price
|
30
36
|
#
|
@@ -37,11 +43,13 @@ module Orb
|
|
37
43
|
# @return [String, nil]
|
38
44
|
optional :price_id, String, nil?: true
|
39
45
|
|
40
|
-
# @!method initialize(currency:, price_groups:, inline_price_index: nil, price_id: nil)
|
46
|
+
# @!method initialize(currency:, price_groups:, external_price_id: nil, inline_price_index: nil, price_id: nil)
|
41
47
|
# @param currency [String] The currency of the price
|
42
48
|
#
|
43
49
|
# @param price_groups [Array<Orb::Models::EvaluatePriceGroup>] The computed price groups associated with input price.
|
44
50
|
#
|
51
|
+
# @param external_price_id [String, nil] The external ID of the price
|
52
|
+
#
|
45
53
|
# @param inline_price_index [Integer, nil] The index of the inline price
|
46
54
|
#
|
47
55
|
# @param price_id [String, nil] The ID of the price
|
@@ -110,6 +110,12 @@ module Orb
|
|
110
110
|
end
|
111
111
|
|
112
112
|
class PriceEvaluation < Orb::Internal::Type::BaseModel
|
113
|
+
# @!attribute external_price_id
|
114
|
+
# The external ID of a price to evaluate that exists in your Orb account.
|
115
|
+
#
|
116
|
+
# @return [String, nil]
|
117
|
+
optional :external_price_id, String, nil?: true
|
118
|
+
|
113
119
|
# @!attribute filter
|
114
120
|
# A boolean
|
115
121
|
# [computed property](/extensibility/advanced-metrics#computed-properties) used to
|
@@ -143,11 +149,13 @@ module Orb
|
|
143
149
|
# @return [String, nil]
|
144
150
|
optional :price_id, String, nil?: true
|
145
151
|
|
146
|
-
# @!method initialize(filter: nil, grouping_keys: nil, price: nil, price_id: nil)
|
152
|
+
# @!method initialize(external_price_id: nil, filter: nil, grouping_keys: nil, price: nil, price_id: nil)
|
147
153
|
# Some parameter documentations has been truncated, see
|
148
154
|
# {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation} for more
|
149
155
|
# details.
|
150
156
|
#
|
157
|
+
# @param external_price_id [String, nil] The external ID of a price to evaluate that exists in your Orb account.
|
158
|
+
#
|
151
159
|
# @param filter [String, nil] A boolean [computed property](/extensibility/advanced-metrics#computed-propertie
|
152
160
|
#
|
153
161
|
# @param grouping_keys [Array<String>] Properties (or [computed properties](/extensibility/advanced-metrics#computed-pr
|
@@ -25,6 +25,12 @@ module Orb
|
|
25
25
|
# @return [Array<Orb::Models::EvaluatePriceGroup>]
|
26
26
|
required :price_groups, -> { Orb::Internal::Type::ArrayOf[Orb::EvaluatePriceGroup] }
|
27
27
|
|
28
|
+
# @!attribute external_price_id
|
29
|
+
# The external ID of the price
|
30
|
+
#
|
31
|
+
# @return [String, nil]
|
32
|
+
optional :external_price_id, String, nil?: true
|
33
|
+
|
28
34
|
# @!attribute inline_price_index
|
29
35
|
# The index of the inline price
|
30
36
|
#
|
@@ -37,11 +43,13 @@ module Orb
|
|
37
43
|
# @return [String, nil]
|
38
44
|
optional :price_id, String, nil?: true
|
39
45
|
|
40
|
-
# @!method initialize(currency:, price_groups:, inline_price_index: nil, price_id: nil)
|
46
|
+
# @!method initialize(currency:, price_groups:, external_price_id: nil, inline_price_index: nil, price_id: nil)
|
41
47
|
# @param currency [String] The currency of the price
|
42
48
|
#
|
43
49
|
# @param price_groups [Array<Orb::Models::EvaluatePriceGroup>] The computed price groups associated with input price.
|
44
50
|
#
|
51
|
+
# @param external_price_id [String, nil] The external ID of the price
|
52
|
+
#
|
45
53
|
# @param inline_price_index [Integer, nil] The index of the inline price
|
46
54
|
#
|
47
55
|
# @param price_id [String, nil] The ID of the price
|
@@ -99,7 +99,8 @@ module Orb
|
|
99
99
|
# @!attribute discount_intervals
|
100
100
|
# @deprecated
|
101
101
|
#
|
102
|
-
# The discount intervals for this subscription sorted by the start_date.
|
102
|
+
# The discount intervals for this subscription sorted by the start_date. This
|
103
|
+
# field is deprecated in favor of `adjustment_intervals`.
|
103
104
|
#
|
104
105
|
# @return [Array<Orb::Models::AmountDiscountInterval, Orb::Models::PercentageDiscountInterval, Orb::Models::UsageDiscountInterval>]
|
105
106
|
required :discount_intervals,
|
@@ -125,7 +126,8 @@ module Orb
|
|
125
126
|
# @!attribute maximum_intervals
|
126
127
|
# @deprecated
|
127
128
|
#
|
128
|
-
# The maximum intervals for this subscription sorted by the start_date.
|
129
|
+
# The maximum intervals for this subscription sorted by the start_date. This field
|
130
|
+
# is deprecated in favor of `adjustment_intervals`.
|
129
131
|
#
|
130
132
|
# @return [Array<Orb::Models::MaximumInterval>]
|
131
133
|
required :maximum_intervals, -> { Orb::Internal::Type::ArrayOf[Orb::MaximumInterval] }
|
@@ -142,7 +144,8 @@ module Orb
|
|
142
144
|
# @!attribute minimum_intervals
|
143
145
|
# @deprecated
|
144
146
|
#
|
145
|
-
# The minimum intervals for this subscription sorted by the start_date.
|
147
|
+
# The minimum intervals for this subscription sorted by the start_date. This field
|
148
|
+
# is deprecated in favor of `adjustment_intervals`.
|
146
149
|
#
|
147
150
|
# @return [Array<Orb::Models::MinimumInterval>]
|
148
151
|
required :minimum_intervals, -> { Orb::Internal::Type::ArrayOf[Orb::MinimumInterval] }
|
@@ -250,7 +253,7 @@ module Orb
|
|
250
253
|
#
|
251
254
|
# @param default_invoice_memo [String, nil] Determines the default memo on this subscriptions' invoices. Note that if this i
|
252
255
|
#
|
253
|
-
# @param discount_intervals [Array<Orb::Models::AmountDiscountInterval, Orb::Models::PercentageDiscountInterval, Orb::Models::UsageDiscountInterval>] The discount intervals for this subscription sorted by the start_date.
|
256
|
+
# @param discount_intervals [Array<Orb::Models::AmountDiscountInterval, Orb::Models::PercentageDiscountInterval, Orb::Models::UsageDiscountInterval>] The discount intervals for this subscription sorted by the start_date. This fiel
|
254
257
|
#
|
255
258
|
# @param end_date [Time, nil] The date Orb stops billing for this subscription.
|
256
259
|
#
|
@@ -258,11 +261,11 @@ module Orb
|
|
258
261
|
#
|
259
262
|
# @param invoicing_threshold [String, nil]
|
260
263
|
#
|
261
|
-
# @param maximum_intervals [Array<Orb::Models::MaximumInterval>] The maximum intervals for this subscription sorted by the start_date.
|
264
|
+
# @param maximum_intervals [Array<Orb::Models::MaximumInterval>] The maximum intervals for this subscription sorted by the start_date. This field
|
262
265
|
#
|
263
266
|
# @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t
|
264
267
|
#
|
265
|
-
# @param minimum_intervals [Array<Orb::Models::MinimumInterval>] The minimum intervals for this subscription sorted by the start_date.
|
268
|
+
# @param minimum_intervals [Array<Orb::Models::MinimumInterval>] The minimum intervals for this subscription sorted by the start_date. This field
|
266
269
|
#
|
267
270
|
# @param name [String] The name of the subscription.
|
268
271
|
#
|
@@ -491,8 +491,8 @@ module Orb
|
|
491
491
|
optional :billing_cycle_day, Integer, nil?: true
|
492
492
|
|
493
493
|
# @!attribute end_date
|
494
|
-
# The updated end date of this price interval. If not specified, the
|
495
|
-
#
|
494
|
+
# The updated end date of this price interval. If not specified, the end date will
|
495
|
+
# not be updated.
|
496
496
|
#
|
497
497
|
# @return [Time, Symbol, Orb::Models::BillingCycleRelativeDate, nil]
|
498
498
|
optional :end_date, union: -> { Orb::SubscriptionPriceIntervalsParams::Edit::EndDate }, nil?: true
|
@@ -544,7 +544,7 @@ module Orb
|
|
544
544
|
#
|
545
545
|
# @param billing_cycle_day [Integer, nil] The updated billing cycle day for this price interval. If not specified, the bil
|
546
546
|
#
|
547
|
-
# @param end_date [Time, Symbol, Orb::Models::BillingCycleRelativeDate, nil] The updated end date of this price interval. If not specified, the
|
547
|
+
# @param end_date [Time, Symbol, Orb::Models::BillingCycleRelativeDate, nil] The updated end date of this price interval. If not specified, the end date will
|
548
548
|
#
|
549
549
|
# @param filter [String, nil] An additional filter to apply to usage queries. This filter must be expressed as
|
550
550
|
#
|
@@ -554,8 +554,8 @@ module Orb
|
|
554
554
|
#
|
555
555
|
# @param usage_customer_ids [Array<String>, nil] A list of customer IDs whose usage events will be aggregated and billed under th
|
556
556
|
|
557
|
-
# The updated end date of this price interval. If not specified, the
|
558
|
-
#
|
557
|
+
# The updated end date of this price interval. If not specified, the end date will
|
558
|
+
# not be updated.
|
559
559
|
#
|
560
560
|
# @see Orb::Models::SubscriptionPriceIntervalsParams::Edit#end_date
|
561
561
|
module EndDate
|
@@ -612,8 +612,8 @@ module Orb
|
|
612
612
|
required :adjustment_interval_id, String
|
613
613
|
|
614
614
|
# @!attribute end_date
|
615
|
-
# The updated end date of this adjustment interval. If not specified, the
|
616
|
-
#
|
615
|
+
# The updated end date of this adjustment interval. If not specified, the end date
|
616
|
+
# will not be updated.
|
617
617
|
#
|
618
618
|
# @return [Time, Symbol, Orb::Models::BillingCycleRelativeDate, nil]
|
619
619
|
optional :end_date,
|
@@ -634,12 +634,12 @@ module Orb
|
|
634
634
|
#
|
635
635
|
# @param adjustment_interval_id [String] The id of the adjustment interval to edit.
|
636
636
|
#
|
637
|
-
# @param end_date [Time, Symbol, Orb::Models::BillingCycleRelativeDate, nil] The updated end date of this adjustment interval. If not specified, the
|
637
|
+
# @param end_date [Time, Symbol, Orb::Models::BillingCycleRelativeDate, nil] The updated end date of this adjustment interval. If not specified, the end date
|
638
638
|
#
|
639
639
|
# @param start_date [Time, Symbol, Orb::Models::BillingCycleRelativeDate] The updated start date of this adjustment interval. If not specified, the start
|
640
640
|
|
641
|
-
# The updated end date of this adjustment interval. If not specified, the
|
642
|
-
#
|
641
|
+
# The updated end date of this adjustment interval. If not specified, the end date
|
642
|
+
# will not be updated.
|
643
643
|
#
|
644
644
|
# @see Orb::Models::SubscriptionPriceIntervalsParams::EditAdjustment#end_date
|
645
645
|
module EndDate
|
@@ -3,17 +3,49 @@
|
|
3
3
|
module Orb
|
4
4
|
module Resources
|
5
5
|
class CreditNotes
|
6
|
+
# Some parameter documentations has been truncated, see
|
7
|
+
# {Orb::Models::CreditNoteCreateParams} for more details.
|
8
|
+
#
|
6
9
|
# This endpoint is used to create a single
|
7
10
|
# [`Credit Note`](/invoicing/credit-notes).
|
8
11
|
#
|
9
|
-
#
|
12
|
+
# The credit note service period configuration supports two explicit modes:
|
13
|
+
#
|
14
|
+
# 1. Global service periods: Specify start_date and end_date at the credit note
|
15
|
+
# level. These dates will be applied to all line items uniformly.
|
16
|
+
#
|
17
|
+
# 2. Individual service periods: Specify start_date and end_date for each line
|
18
|
+
# item. When using this mode, ALL line items must have individual periods
|
19
|
+
# specified.
|
20
|
+
#
|
21
|
+
# 3. Default behavior: If no service periods are specified (neither global nor
|
22
|
+
# individual), the original invoice line item service periods will be used.
|
23
|
+
#
|
24
|
+
# Note: Mixing global and individual service periods in the same request is not
|
25
|
+
# allowed to prevent confusion.
|
26
|
+
#
|
27
|
+
# Service period dates are normalized to the start of the day in the customer's
|
28
|
+
# timezone to ensure consistent handling across different timezones.
|
29
|
+
#
|
30
|
+
# Date Format: Use start_date and end_date with format "YYYY-MM-DD" (e.g.,
|
31
|
+
# "2023-09-22") to match other Orb APIs like /v1/invoice_line_items.
|
32
|
+
#
|
33
|
+
# Note: Both start_date and end_date are inclusive - the service period will cover
|
34
|
+
# both the start date and end date completely (from start of start_date to end of
|
35
|
+
# end_date).
|
36
|
+
#
|
37
|
+
# @overload create(line_items:, reason:, end_date: nil, memo: nil, start_date: nil, request_options: {})
|
10
38
|
#
|
11
39
|
# @param line_items [Array<Orb::Models::CreditNoteCreateParams::LineItem>]
|
12
40
|
#
|
13
41
|
# @param reason [Symbol, Orb::Models::CreditNoteCreateParams::Reason] An optional reason for the credit note.
|
14
42
|
#
|
43
|
+
# @param end_date [Date, nil] A date string to specify the global credit note service period end date in the c
|
44
|
+
#
|
15
45
|
# @param memo [String, nil] An optional memo to attach to the credit note.
|
16
46
|
#
|
47
|
+
# @param start_date [Date, nil] A date string to specify the global credit note service period start date in the
|
48
|
+
#
|
17
49
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
18
50
|
#
|
19
51
|
# @return [Orb::Models::CreditNote]
|
@@ -60,17 +60,17 @@ module Orb
|
|
60
60
|
#
|
61
61
|
# A customer that uses a few API calls a day but has a minimum commitment might
|
62
62
|
# exhibit the following pattern for their subtotal and total in the first few days
|
63
|
-
# of the month. Here, we assume that each API call is
|
64
|
-
# has a monthly minimum of
|
65
|
-
# period bounds are aligned to the first of the month:
|
63
|
+
# of the month. Here, we assume that each API call is \$2.50, the customer's plan
|
64
|
+
# has a monthly minimum of \$50 for this price, and that the subscription's
|
65
|
+
# billing period bounds are aligned to the first of the month:
|
66
66
|
#
|
67
67
|
# | timeframe_start | timeframe_end | Cumulative usage | Subtotal | Total (incl. commitment) |
|
68
68
|
# | --------------- | ------------- | ---------------- | -------- | ------------------------ |
|
69
|
-
# | 2023-02-01 | 2023-02-02 | 9 |
|
70
|
-
# | 2023-02-01 | 2023-02-03 | 19 |
|
71
|
-
# | 2023-02-01 | 2023-02-04 | 20 |
|
72
|
-
# | 2023-02-01 | 2023-02-05 | 28 |
|
73
|
-
# | 2023-02-01 | 2023-02-06 | 36 |
|
69
|
+
# | 2023-02-01 | 2023-02-02 | 9 | \$22.50 | \$50.00 |
|
70
|
+
# | 2023-02-01 | 2023-02-03 | 19 | \$47.50 | \$50.00 |
|
71
|
+
# | 2023-02-01 | 2023-02-04 | 20 | \$50.00 | \$50.00 |
|
72
|
+
# | 2023-02-01 | 2023-02-05 | 28 | \$70.00 | \$70.00 |
|
73
|
+
# | 2023-02-01 | 2023-02-06 | 36 | \$90.00 | \$90.00 |
|
74
74
|
#
|
75
75
|
# ### Periodic values
|
76
76
|
#
|
@@ -209,17 +209,17 @@ module Orb
|
|
209
209
|
#
|
210
210
|
# A customer that uses a few API calls a day but has a minimum commitment might
|
211
211
|
# exhibit the following pattern for their subtotal and total in the first few days
|
212
|
-
# of the month. Here, we assume that each API call is
|
213
|
-
# has a monthly minimum of
|
214
|
-
# period bounds are aligned to the first of the month:
|
212
|
+
# of the month. Here, we assume that each API call is \$2.50, the customer's plan
|
213
|
+
# has a monthly minimum of \$50 for this price, and that the subscription's
|
214
|
+
# billing period bounds are aligned to the first of the month:
|
215
215
|
#
|
216
216
|
# | timeframe_start | timeframe_end | Cumulative usage | Subtotal | Total (incl. commitment) |
|
217
217
|
# | --------------- | ------------- | ---------------- | -------- | ------------------------ |
|
218
|
-
# | 2023-02-01 | 2023-02-02 | 9 |
|
219
|
-
# | 2023-02-01 | 2023-02-03 | 19 |
|
220
|
-
# | 2023-02-01 | 2023-02-04 | 20 |
|
221
|
-
# | 2023-02-01 | 2023-02-05 | 28 |
|
222
|
-
# | 2023-02-01 | 2023-02-06 | 36 |
|
218
|
+
# | 2023-02-01 | 2023-02-02 | 9 | \$22.50 | \$50.00 |
|
219
|
+
# | 2023-02-01 | 2023-02-03 | 19 | \$47.50 | \$50.00 |
|
220
|
+
# | 2023-02-01 | 2023-02-04 | 20 | \$50.00 | \$50.00 |
|
221
|
+
# | 2023-02-01 | 2023-02-05 | 28 | \$70.00 | \$70.00 |
|
222
|
+
# | 2023-02-01 | 2023-02-06 | 36 | \$90.00 | \$90.00 |
|
223
223
|
#
|
224
224
|
# ### Periodic values
|
225
225
|
#
|
@@ -46,8 +46,8 @@ module Orb
|
|
46
46
|
# deductions take place from a non-expiring credit block.
|
47
47
|
#
|
48
48
|
# If there are multiple blocks with the same expiration date, Orb will deduct from
|
49
|
-
# the block with the _lower cost basis_ first (e.g. trial credits with a
|
50
|
-
# basis before paid credits with a
|
49
|
+
# the block with the _lower cost basis_ first (e.g. trial credits with a \$0 cost
|
50
|
+
# basis before paid credits with a \$5.00 cost basis).
|
51
51
|
#
|
52
52
|
# It's also possible for a single usage event's deduction to _span_ credit blocks.
|
53
53
|
# In this case, Orb will deduct from the next block, ending at the credit block
|
@@ -495,8 +495,8 @@ module Orb
|
|
495
495
|
# deductions take place from a non-expiring credit block.
|
496
496
|
#
|
497
497
|
# If there are multiple blocks with the same expiration date, Orb will deduct from
|
498
|
-
# the block with the _lower cost basis_ first (e.g. trial credits with a
|
499
|
-
# basis before paid credits with a
|
498
|
+
# the block with the _lower cost basis_ first (e.g. trial credits with a \$0 cost
|
499
|
+
# basis before paid credits with a \$5.00 cost basis).
|
500
500
|
#
|
501
501
|
# It's also possible for a single usage event's deduction to _span_ credit blocks.
|
502
502
|
# In this case, Orb will deduct from the next block, ending at the credit block
|
@@ -283,7 +283,7 @@ module Orb
|
|
283
283
|
#
|
284
284
|
# If the associated invoice has used the customer balance to change the amount
|
285
285
|
# due, the customer balance operation will be reverted. For example, if the
|
286
|
-
# invoice used
|
286
|
+
# invoice used \$10 of customer balance, that amount will be added back to the
|
287
287
|
# customer balance upon voiding.
|
288
288
|
#
|
289
289
|
# If the invoice was used to purchase a credit block, but the invoice is not yet
|
@@ -261,7 +261,7 @@ module Orb
|
|
261
261
|
# is hit. To enable threshold billing, pass in an `invoicing_threshold`, which is
|
262
262
|
# specified in the subscription's invoicing currency, when creating a
|
263
263
|
# subscription. E.g. pass in `10.00` to issue an invoice when usage amounts hit
|
264
|
-
#
|
264
|
+
# \$10.00 for a subscription that invoices in USD.
|
265
265
|
#
|
266
266
|
# @overload create(add_adjustments: nil, add_prices: nil, align_billing_with_subscription_start_date: nil, auto_collection: nil, aws_region: nil, billing_cycle_anchor_configuration: nil, coupon_redemption_code: nil, credits_overage_rate: nil, currency: nil, customer_id: nil, default_invoice_memo: nil, end_date: nil, external_customer_id: nil, external_marketplace: nil, external_marketplace_reporting_id: nil, external_plan_id: nil, filter: nil, initial_phase_order: nil, invoicing_threshold: nil, metadata: nil, name: nil, net_terms: nil, per_credit_overage_amount: nil, plan_id: nil, plan_version_number: nil, price_overrides: nil, remove_adjustments: nil, remove_prices: nil, replace_adjustments: nil, replace_prices: nil, start_date: nil, trial_duration_days: nil, usage_customer_ids: nil, request_options: {})
|
267
267
|
#
|
data/lib/orb/version.rb
CHANGED