Skip to content

Commit 6babc11

Browse files
feat(api): api update
1 parent acea921 commit 6babc11

39 files changed

+483
-123
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 116
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-0db984d367f9ae04249fb6c72789b0a38ef1785d156b438fe03290fa4e262a7d.yml
3-
openapi_spec_hash: c901c8b4fc2b0399a33b1346f8521850
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-612316c13276a207f56e2e2c7bbc68f4bb73de85e3661595a23f23d9ccc80276.yml
3+
openapi_spec_hash: 6e125f05e40521ec485edf6e15beec2e
44
config_hash: 3c3524be9607afb24d2139ce26ce5389

lib/orb/models/credit_note.rb

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,19 @@ class LineItem < Orb::Internal::Type::BaseModel
181181
# @return [Array<Orb::Models::CreditNote::LineItem::Discount>, nil]
182182
optional :discounts, -> { Orb::Internal::Type::ArrayOf[Orb::CreditNote::LineItem::Discount] }
183183

184-
# @!method initialize(id:, amount:, item_id:, name:, quantity:, subtotal:, tax_amounts:, discounts: nil)
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)
185197
# @param id [String] The Orb id of this resource.
186198
#
187199
# @param amount [String] The amount of the line item, including any line item minimums and discounts.
@@ -197,6 +209,10 @@ class LineItem < Orb::Internal::Type::BaseModel
197209
# @param tax_amounts [Array<Orb::Models::TaxAmount>] Any tax amounts applied onto the line item.
198210
#
199211
# @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.
200216

201217
class Discount < Orb::Internal::Type::BaseModel
202218
# @!attribute id

lib/orb/models/credit_note_create_params.rb

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,44 @@ class CreditNoteCreateParams < Orb::Internal::Type::BaseModel
1818
# @return [Symbol, Orb::Models::CreditNoteCreateParams::Reason]
1919
required :reason, enum: -> { Orb::CreditNoteCreateParams::Reason }
2020

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+
2130
# @!attribute memo
2231
# An optional memo to attach to the credit note.
2332
#
2433
# @return [String, nil]
2534
optional :memo, String, nil?: true
2635

27-
# @!method initialize(line_items:, reason:, memo: nil, request_options: {})
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+
#
2849
# @param line_items [Array<Orb::Models::CreditNoteCreateParams::LineItem>]
2950
#
3051
# @param reason [Symbol, Orb::Models::CreditNoteCreateParams::Reason] An optional reason for the credit note.
3152
#
53+
# @param end_date [Date, nil] A date string to specify the global credit note service period end date in the c
54+
#
3255
# @param memo [String, nil] An optional memo to attach to the credit note.
3356
#
57+
# @param start_date [Date, nil] A date string to specify the global credit note service period start date in the
58+
#
3459
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
3560

3661
class LineItem < Orb::Internal::Type::BaseModel
@@ -46,10 +71,36 @@ class LineItem < Orb::Internal::Type::BaseModel
4671
# @return [String]
4772
required :invoice_line_item_id, String
4873

49-
# @!method initialize(amount:, invoice_line_item_id:)
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+
#
5097
# @param amount [String] The total amount in the invoice's currency to credit this line item.
5198
#
5299
# @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
53104
end
54105

55106
# An optional reason for the credit note.

lib/orb/models/events/backfill_create_params.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ class BackfillCreateParams < Orb::Internal::Type::BaseModel
1010

1111
# @!attribute timeframe_end
1212
# The (exclusive) end of the usage timeframe affected by this backfill. By
13-
# default, Orb allows backfills up to 10 days in duration at a time. Reach out to
13+
# default, Orb allows backfills up to 31 days in duration at a time. Reach out to
1414
# discuss extending this limit and your use case.
1515
#
1616
# @return [Time]
1717
required :timeframe_end, Time
1818

1919
# @!attribute timeframe_start
2020
# The (inclusive) start of the usage timeframe affected by this backfill. By
21-
# default, Orb allows backfills up to 10 days in duration at a time. Reach out to
21+
# default, Orb allows backfills up to 31 days in duration at a time. Reach out to
2222
# discuss extending this limit and your use case.
2323
#
2424
# @return [Time]

lib/orb/models/mutated_subscription.rb

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ class MutatedSubscription < Orb::Internal::Type::BaseModel
9898
# @!attribute discount_intervals
9999
# @deprecated
100100
#
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`.
102103
#
103104
# @return [Array<Orb::Models::AmountDiscountInterval, Orb::Models::PercentageDiscountInterval, Orb::Models::UsageDiscountInterval>]
104105
required :discount_intervals,
@@ -124,7 +125,8 @@ class MutatedSubscription < Orb::Internal::Type::BaseModel
124125
# @!attribute maximum_intervals
125126
# @deprecated
126127
#
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`.
128130
#
129131
# @return [Array<Orb::Models::MaximumInterval>]
130132
required :maximum_intervals, -> { Orb::Internal::Type::ArrayOf[Orb::MaximumInterval] }
@@ -141,7 +143,8 @@ class MutatedSubscription < Orb::Internal::Type::BaseModel
141143
# @!attribute minimum_intervals
142144
# @deprecated
143145
#
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`.
145148
#
146149
# @return [Array<Orb::Models::MinimumInterval>]
147150
required :minimum_intervals, -> { Orb::Internal::Type::ArrayOf[Orb::MinimumInterval] }
@@ -237,19 +240,19 @@ class MutatedSubscription < Orb::Internal::Type::BaseModel
237240
#
238241
# @param default_invoice_memo [String, nil] Determines the default memo on this subscriptions' invoices. Note that if this i
239242
#
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
241244
#
242245
# @param end_date [Time, nil] The date Orb stops billing for this subscription.
243246
#
244247
# @param fixed_fee_quantity_schedule [Array<Orb::Models::FixedFeeQuantityScheduleEntry>]
245248
#
246249
# @param invoicing_threshold [String, nil]
247250
#
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
249252
#
250253
# @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t
251254
#
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
253256
#
254257
# @param name [String] The name of the subscription.
255258
#

lib/orb/models/price_evaluate_multiple_params.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ class PriceEvaluateMultipleParams < Orb::Internal::Type::BaseModel
5252
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
5353

5454
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+
5561
# @!attribute filter
5662
# A boolean
5763
# [computed property](/extensibility/advanced-metrics#computed-properties) used to
@@ -81,10 +87,12 @@ class PriceEvaluation < Orb::Internal::Type::BaseModel
8187
# @return [String, nil]
8288
optional :price_id, String, nil?: true
8389

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)
8591
# Some parameter documentations has been truncated, see
8692
# {Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation} for more details.
8793
#
94+
# @param external_price_id [String, nil] The external ID of a price to evaluate that exists in your Orb account.
95+
#
8896
# @param filter [String, nil] A boolean [computed property](/extensibility/advanced-metrics#computed-propertie
8997
#
9098
# @param grouping_keys [Array<String>] Properties (or [computed properties](/extensibility/advanced-metrics#computed-pr

lib/orb/models/price_evaluate_multiple_response.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ class Data < Orb::Internal::Type::BaseModel
2525
# @return [Array<Orb::Models::EvaluatePriceGroup>]
2626
required :price_groups, -> { Orb::Internal::Type::ArrayOf[Orb::EvaluatePriceGroup] }
2727

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+
2834
# @!attribute inline_price_index
2935
# The index of the inline price
3036
#
@@ -37,11 +43,13 @@ class Data < Orb::Internal::Type::BaseModel
3743
# @return [String, nil]
3844
optional :price_id, String, nil?: true
3945

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)
4147
# @param currency [String] The currency of the price
4248
#
4349
# @param price_groups [Array<Orb::Models::EvaluatePriceGroup>] The computed price groups associated with input price.
4450
#
51+
# @param external_price_id [String, nil] The external ID of the price
52+
#
4553
# @param inline_price_index [Integer, nil] The index of the inline price
4654
#
4755
# @param price_id [String, nil] The ID of the price

lib/orb/models/price_evaluate_preview_events_params.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ class Event < Orb::Internal::Type::BaseModel
110110
end
111111

112112
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+
113119
# @!attribute filter
114120
# A boolean
115121
# [computed property](/extensibility/advanced-metrics#computed-properties) used to
@@ -143,11 +149,13 @@ class PriceEvaluation < Orb::Internal::Type::BaseModel
143149
# @return [String, nil]
144150
optional :price_id, String, nil?: true
145151

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)
147153
# Some parameter documentations has been truncated, see
148154
# {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation} for more
149155
# details.
150156
#
157+
# @param external_price_id [String, nil] The external ID of a price to evaluate that exists in your Orb account.
158+
#
151159
# @param filter [String, nil] A boolean [computed property](/extensibility/advanced-metrics#computed-propertie
152160
#
153161
# @param grouping_keys [Array<String>] Properties (or [computed properties](/extensibility/advanced-metrics#computed-pr

lib/orb/models/price_evaluate_preview_events_response.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ class Data < Orb::Internal::Type::BaseModel
2525
# @return [Array<Orb::Models::EvaluatePriceGroup>]
2626
required :price_groups, -> { Orb::Internal::Type::ArrayOf[Orb::EvaluatePriceGroup] }
2727

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+
2834
# @!attribute inline_price_index
2935
# The index of the inline price
3036
#
@@ -37,11 +43,13 @@ class Data < Orb::Internal::Type::BaseModel
3743
# @return [String, nil]
3844
optional :price_id, String, nil?: true
3945

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)
4147
# @param currency [String] The currency of the price
4248
#
4349
# @param price_groups [Array<Orb::Models::EvaluatePriceGroup>] The computed price groups associated with input price.
4450
#
51+
# @param external_price_id [String, nil] The external ID of the price
52+
#
4553
# @param inline_price_index [Integer, nil] The index of the inline price
4654
#
4755
# @param price_id [String, nil] The ID of the price

lib/orb/models/subscription.rb

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ class Subscription < Orb::Internal::Type::BaseModel
9999
# @!attribute discount_intervals
100100
# @deprecated
101101
#
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`.
103104
#
104105
# @return [Array<Orb::Models::AmountDiscountInterval, Orb::Models::PercentageDiscountInterval, Orb::Models::UsageDiscountInterval>]
105106
required :discount_intervals,
@@ -125,7 +126,8 @@ class Subscription < Orb::Internal::Type::BaseModel
125126
# @!attribute maximum_intervals
126127
# @deprecated
127128
#
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`.
129131
#
130132
# @return [Array<Orb::Models::MaximumInterval>]
131133
required :maximum_intervals, -> { Orb::Internal::Type::ArrayOf[Orb::MaximumInterval] }
@@ -142,7 +144,8 @@ class Subscription < Orb::Internal::Type::BaseModel
142144
# @!attribute minimum_intervals
143145
# @deprecated
144146
#
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`.
146149
#
147150
# @return [Array<Orb::Models::MinimumInterval>]
148151
required :minimum_intervals, -> { Orb::Internal::Type::ArrayOf[Orb::MinimumInterval] }
@@ -250,19 +253,19 @@ class Subscription < Orb::Internal::Type::BaseModel
250253
#
251254
# @param default_invoice_memo [String, nil] Determines the default memo on this subscriptions' invoices. Note that if this i
252255
#
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
254257
#
255258
# @param end_date [Time, nil] The date Orb stops billing for this subscription.
256259
#
257260
# @param fixed_fee_quantity_schedule [Array<Orb::Models::FixedFeeQuantityScheduleEntry>]
258261
#
259262
# @param invoicing_threshold [String, nil]
260263
#
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
262265
#
263266
# @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t
264267
#
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
266269
#
267270
# @param name [String] The name of the subscription.
268271
#

0 commit comments

Comments
 (0)