orb-billing 0.11.0 → 0.12.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 +19 -0
- data/README.md +1 -1
- data/lib/orb/internal/type/union.rb +3 -8
- data/lib/orb/internal/util.rb +8 -9
- data/lib/orb/models/amount_discount.rb +65 -1
- data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +1437 -15
- data/lib/orb/models/beta_create_plan_version_params.rb +1435 -15
- data/lib/orb/models/percentage_discount.rb +65 -1
- data/lib/orb/models/subscription_create_params.rb +1435 -15
- data/lib/orb/models/subscription_price_intervals_params.rb +715 -5
- data/lib/orb/models/subscription_redeem_coupon_params.rb +17 -9
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +1435 -15
- data/lib/orb/models/trial_discount.rb +65 -1
- data/lib/orb/models/usage_discount.rb +65 -1
- data/lib/orb/resources/subscriptions.rb +5 -3
- data/lib/orb/version.rb +1 -1
- data/rbi/orb/internal/util.rbi +2 -0
- data/rbi/orb/models/amount_discount.rbi +117 -0
- data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +6145 -3045
- data/rbi/orb/models/beta_create_plan_version_params.rbi +6096 -2996
- data/rbi/orb/models/percentage_discount.rbi +131 -0
- data/rbi/orb/models/subscription_create_params.rbi +6037 -2937
- data/rbi/orb/models/subscription_price_intervals_params.rbi +1633 -83
- data/rbi/orb/models/subscription_redeem_coupon_params.rbi +16 -8
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +6948 -3848
- data/rbi/orb/models/trial_discount.rbi +109 -0
- data/rbi/orb/models/usage_discount.rbi +109 -0
- data/rbi/orb/resources/subscriptions.rbi +6 -3
- data/sig/orb/models/amount_discount.rbs +58 -0
- data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +1130 -20
- data/sig/orb/models/beta_create_plan_version_params.rbs +1130 -20
- data/sig/orb/models/percentage_discount.rbs +58 -0
- data/sig/orb/models/subscription_create_params.rbs +1130 -20
- data/sig/orb/models/subscription_price_intervals_params.rbs +565 -10
- data/sig/orb/models/subscription_redeem_coupon_params.rbs +11 -6
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +1130 -20
- data/sig/orb/models/trial_discount.rbs +58 -0
- data/sig/orb/models/usage_discount.rbs +58 -0
- data/sig/orb/resources/subscriptions.rbs +2 -1
- metadata +2 -2
@@ -162,12 +162,44 @@ module Orb
|
|
162
162
|
# @return [Float]
|
163
163
|
required :percentage_discount, Float
|
164
164
|
|
165
|
+
# @!attribute applies_to_all
|
166
|
+
# If set, the adjustment will apply to every price on the subscription.
|
167
|
+
#
|
168
|
+
# @return [Boolean, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::AppliesToAll, nil]
|
169
|
+
optional :applies_to_all,
|
170
|
+
enum: -> {
|
171
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::AppliesToAll
|
172
|
+
},
|
173
|
+
nil?: true
|
174
|
+
|
175
|
+
# @!attribute applies_to_item_ids
|
176
|
+
# The set of item IDs to which this adjustment applies.
|
177
|
+
#
|
178
|
+
# @return [Array<String>, nil]
|
179
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
180
|
+
|
165
181
|
# @!attribute applies_to_price_ids
|
166
182
|
# The set of price IDs to which this adjustment applies.
|
167
183
|
#
|
168
184
|
# @return [Array<String>, nil]
|
169
185
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
170
186
|
|
187
|
+
# @!attribute currency
|
188
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
189
|
+
#
|
190
|
+
# @return [String, nil]
|
191
|
+
optional :currency, String, nil?: true
|
192
|
+
|
193
|
+
# @!attribute filters
|
194
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
195
|
+
#
|
196
|
+
# @return [Array<Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::Filter>, nil]
|
197
|
+
optional :filters,
|
198
|
+
-> {
|
199
|
+
Orb::Internal::Type::ArrayOf[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::Filter]
|
200
|
+
},
|
201
|
+
nil?: true
|
202
|
+
|
171
203
|
# @!attribute is_invoice_level
|
172
204
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
173
205
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -175,18 +207,128 @@ module Orb
|
|
175
207
|
# @return [Boolean, nil]
|
176
208
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
177
209
|
|
178
|
-
# @!
|
210
|
+
# @!attribute price_type
|
211
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
212
|
+
#
|
213
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::PriceType, nil]
|
214
|
+
optional :price_type,
|
215
|
+
enum: -> {
|
216
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::PriceType
|
217
|
+
},
|
218
|
+
nil?: true
|
219
|
+
|
220
|
+
# @!method initialize(percentage_discount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :percentage_discount)
|
179
221
|
# Some parameter documentations has been truncated, see
|
180
222
|
# {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount}
|
181
223
|
# for more details.
|
182
224
|
#
|
183
225
|
# @param percentage_discount [Float]
|
184
226
|
#
|
227
|
+
# @param applies_to_all [Boolean, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
228
|
+
#
|
229
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
230
|
+
#
|
185
231
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
186
232
|
#
|
233
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
234
|
+
#
|
235
|
+
# @param filters [Array<Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
236
|
+
#
|
187
237
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
188
238
|
#
|
239
|
+
# @param price_type [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
240
|
+
#
|
189
241
|
# @param adjustment_type [Symbol, :percentage_discount]
|
242
|
+
|
243
|
+
# If set, the adjustment will apply to every price on the subscription.
|
244
|
+
#
|
245
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount#applies_to_all
|
246
|
+
module AppliesToAll
|
247
|
+
extend Orb::Internal::Type::Enum
|
248
|
+
|
249
|
+
TRUE = true
|
250
|
+
|
251
|
+
# @!method self.values
|
252
|
+
# @return [Array<Boolean>]
|
253
|
+
end
|
254
|
+
|
255
|
+
class Filter < Orb::Internal::Type::BaseModel
|
256
|
+
# @!attribute field
|
257
|
+
# The property of the price to filter on.
|
258
|
+
#
|
259
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Field]
|
260
|
+
required :field,
|
261
|
+
enum: -> {
|
262
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Field
|
263
|
+
}
|
264
|
+
|
265
|
+
# @!attribute operator
|
266
|
+
# Should prices that match the filter be included or excluded.
|
267
|
+
#
|
268
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Operator]
|
269
|
+
required :operator,
|
270
|
+
enum: -> {
|
271
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Operator
|
272
|
+
}
|
273
|
+
|
274
|
+
# @!attribute values
|
275
|
+
# The IDs or values that match this filter.
|
276
|
+
#
|
277
|
+
# @return [Array<String>]
|
278
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
279
|
+
|
280
|
+
# @!method initialize(field:, operator:, values:)
|
281
|
+
# @param field [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Field] The property of the price to filter on.
|
282
|
+
#
|
283
|
+
# @param operator [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
284
|
+
#
|
285
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
286
|
+
|
287
|
+
# The property of the price to filter on.
|
288
|
+
#
|
289
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::Filter#field
|
290
|
+
module Field
|
291
|
+
extend Orb::Internal::Type::Enum
|
292
|
+
|
293
|
+
PRICE_ID = :price_id
|
294
|
+
ITEM_ID = :item_id
|
295
|
+
PRICE_TYPE = :price_type
|
296
|
+
CURRENCY = :currency
|
297
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
298
|
+
|
299
|
+
# @!method self.values
|
300
|
+
# @return [Array<Symbol>]
|
301
|
+
end
|
302
|
+
|
303
|
+
# Should prices that match the filter be included or excluded.
|
304
|
+
#
|
305
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount::Filter#operator
|
306
|
+
module Operator
|
307
|
+
extend Orb::Internal::Type::Enum
|
308
|
+
|
309
|
+
INCLUDES = :includes
|
310
|
+
EXCLUDES = :excludes
|
311
|
+
|
312
|
+
# @!method self.values
|
313
|
+
# @return [Array<Symbol>]
|
314
|
+
end
|
315
|
+
end
|
316
|
+
|
317
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
318
|
+
#
|
319
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::PercentageDiscount#price_type
|
320
|
+
module PriceType
|
321
|
+
extend Orb::Internal::Type::Enum
|
322
|
+
|
323
|
+
USAGE = :usage
|
324
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
325
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
326
|
+
FIXED = :fixed
|
327
|
+
IN_ARREARS = :in_arrears
|
328
|
+
|
329
|
+
# @!method self.values
|
330
|
+
# @return [Array<Symbol>]
|
331
|
+
end
|
190
332
|
end
|
191
333
|
|
192
334
|
class UsageDiscount < Orb::Internal::Type::BaseModel
|
@@ -200,12 +342,44 @@ module Orb
|
|
200
342
|
# @return [Float]
|
201
343
|
required :usage_discount, Float
|
202
344
|
|
345
|
+
# @!attribute applies_to_all
|
346
|
+
# If set, the adjustment will apply to every price on the subscription.
|
347
|
+
#
|
348
|
+
# @return [Boolean, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::AppliesToAll, nil]
|
349
|
+
optional :applies_to_all,
|
350
|
+
enum: -> {
|
351
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::AppliesToAll
|
352
|
+
},
|
353
|
+
nil?: true
|
354
|
+
|
355
|
+
# @!attribute applies_to_item_ids
|
356
|
+
# The set of item IDs to which this adjustment applies.
|
357
|
+
#
|
358
|
+
# @return [Array<String>, nil]
|
359
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
360
|
+
|
203
361
|
# @!attribute applies_to_price_ids
|
204
362
|
# The set of price IDs to which this adjustment applies.
|
205
363
|
#
|
206
364
|
# @return [Array<String>, nil]
|
207
365
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
208
366
|
|
367
|
+
# @!attribute currency
|
368
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
369
|
+
#
|
370
|
+
# @return [String, nil]
|
371
|
+
optional :currency, String, nil?: true
|
372
|
+
|
373
|
+
# @!attribute filters
|
374
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
375
|
+
#
|
376
|
+
# @return [Array<Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::Filter>, nil]
|
377
|
+
optional :filters,
|
378
|
+
-> {
|
379
|
+
Orb::Internal::Type::ArrayOf[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::Filter]
|
380
|
+
},
|
381
|
+
nil?: true
|
382
|
+
|
209
383
|
# @!attribute is_invoice_level
|
210
384
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
211
385
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -213,18 +387,128 @@ module Orb
|
|
213
387
|
# @return [Boolean, nil]
|
214
388
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
215
389
|
|
216
|
-
# @!
|
390
|
+
# @!attribute price_type
|
391
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
392
|
+
#
|
393
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::PriceType, nil]
|
394
|
+
optional :price_type,
|
395
|
+
enum: -> {
|
396
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::PriceType
|
397
|
+
},
|
398
|
+
nil?: true
|
399
|
+
|
400
|
+
# @!method initialize(usage_discount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :usage_discount)
|
217
401
|
# Some parameter documentations has been truncated, see
|
218
402
|
# {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount}
|
219
403
|
# for more details.
|
220
404
|
#
|
221
405
|
# @param usage_discount [Float]
|
222
406
|
#
|
407
|
+
# @param applies_to_all [Boolean, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
408
|
+
#
|
409
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
410
|
+
#
|
223
411
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
224
412
|
#
|
413
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
414
|
+
#
|
415
|
+
# @param filters [Array<Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
416
|
+
#
|
225
417
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
226
418
|
#
|
419
|
+
# @param price_type [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
420
|
+
#
|
227
421
|
# @param adjustment_type [Symbol, :usage_discount]
|
422
|
+
|
423
|
+
# If set, the adjustment will apply to every price on the subscription.
|
424
|
+
#
|
425
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount#applies_to_all
|
426
|
+
module AppliesToAll
|
427
|
+
extend Orb::Internal::Type::Enum
|
428
|
+
|
429
|
+
TRUE = true
|
430
|
+
|
431
|
+
# @!method self.values
|
432
|
+
# @return [Array<Boolean>]
|
433
|
+
end
|
434
|
+
|
435
|
+
class Filter < Orb::Internal::Type::BaseModel
|
436
|
+
# @!attribute field
|
437
|
+
# The property of the price to filter on.
|
438
|
+
#
|
439
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Field]
|
440
|
+
required :field,
|
441
|
+
enum: -> {
|
442
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Field
|
443
|
+
}
|
444
|
+
|
445
|
+
# @!attribute operator
|
446
|
+
# Should prices that match the filter be included or excluded.
|
447
|
+
#
|
448
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Operator]
|
449
|
+
required :operator,
|
450
|
+
enum: -> {
|
451
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Operator
|
452
|
+
}
|
453
|
+
|
454
|
+
# @!attribute values
|
455
|
+
# The IDs or values that match this filter.
|
456
|
+
#
|
457
|
+
# @return [Array<String>]
|
458
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
459
|
+
|
460
|
+
# @!method initialize(field:, operator:, values:)
|
461
|
+
# @param field [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Field] The property of the price to filter on.
|
462
|
+
#
|
463
|
+
# @param operator [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
464
|
+
#
|
465
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
466
|
+
|
467
|
+
# The property of the price to filter on.
|
468
|
+
#
|
469
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::Filter#field
|
470
|
+
module Field
|
471
|
+
extend Orb::Internal::Type::Enum
|
472
|
+
|
473
|
+
PRICE_ID = :price_id
|
474
|
+
ITEM_ID = :item_id
|
475
|
+
PRICE_TYPE = :price_type
|
476
|
+
CURRENCY = :currency
|
477
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
478
|
+
|
479
|
+
# @!method self.values
|
480
|
+
# @return [Array<Symbol>]
|
481
|
+
end
|
482
|
+
|
483
|
+
# Should prices that match the filter be included or excluded.
|
484
|
+
#
|
485
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount::Filter#operator
|
486
|
+
module Operator
|
487
|
+
extend Orb::Internal::Type::Enum
|
488
|
+
|
489
|
+
INCLUDES = :includes
|
490
|
+
EXCLUDES = :excludes
|
491
|
+
|
492
|
+
# @!method self.values
|
493
|
+
# @return [Array<Symbol>]
|
494
|
+
end
|
495
|
+
end
|
496
|
+
|
497
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
498
|
+
#
|
499
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::UsageDiscount#price_type
|
500
|
+
module PriceType
|
501
|
+
extend Orb::Internal::Type::Enum
|
502
|
+
|
503
|
+
USAGE = :usage
|
504
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
505
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
506
|
+
FIXED = :fixed
|
507
|
+
IN_ARREARS = :in_arrears
|
508
|
+
|
509
|
+
# @!method self.values
|
510
|
+
# @return [Array<Symbol>]
|
511
|
+
end
|
228
512
|
end
|
229
513
|
|
230
514
|
class AmountDiscount < Orb::Internal::Type::BaseModel
|
@@ -238,12 +522,44 @@ module Orb
|
|
238
522
|
# @return [String]
|
239
523
|
required :amount_discount, String
|
240
524
|
|
525
|
+
# @!attribute applies_to_all
|
526
|
+
# If set, the adjustment will apply to every price on the subscription.
|
527
|
+
#
|
528
|
+
# @return [Boolean, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::AppliesToAll, nil]
|
529
|
+
optional :applies_to_all,
|
530
|
+
enum: -> {
|
531
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::AppliesToAll
|
532
|
+
},
|
533
|
+
nil?: true
|
534
|
+
|
535
|
+
# @!attribute applies_to_item_ids
|
536
|
+
# The set of item IDs to which this adjustment applies.
|
537
|
+
#
|
538
|
+
# @return [Array<String>, nil]
|
539
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
540
|
+
|
241
541
|
# @!attribute applies_to_price_ids
|
242
542
|
# The set of price IDs to which this adjustment applies.
|
243
543
|
#
|
244
544
|
# @return [Array<String>, nil]
|
245
545
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
246
546
|
|
547
|
+
# @!attribute currency
|
548
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
549
|
+
#
|
550
|
+
# @return [String, nil]
|
551
|
+
optional :currency, String, nil?: true
|
552
|
+
|
553
|
+
# @!attribute filters
|
554
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
555
|
+
#
|
556
|
+
# @return [Array<Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::Filter>, nil]
|
557
|
+
optional :filters,
|
558
|
+
-> {
|
559
|
+
Orb::Internal::Type::ArrayOf[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::Filter]
|
560
|
+
},
|
561
|
+
nil?: true
|
562
|
+
|
247
563
|
# @!attribute is_invoice_level
|
248
564
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
249
565
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -251,18 +567,128 @@ module Orb
|
|
251
567
|
# @return [Boolean, nil]
|
252
568
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
253
569
|
|
254
|
-
# @!
|
570
|
+
# @!attribute price_type
|
571
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
572
|
+
#
|
573
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::PriceType, nil]
|
574
|
+
optional :price_type,
|
575
|
+
enum: -> {
|
576
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::PriceType
|
577
|
+
},
|
578
|
+
nil?: true
|
579
|
+
|
580
|
+
# @!method initialize(amount_discount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :amount_discount)
|
255
581
|
# Some parameter documentations has been truncated, see
|
256
582
|
# {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount}
|
257
583
|
# for more details.
|
258
584
|
#
|
259
585
|
# @param amount_discount [String]
|
260
586
|
#
|
587
|
+
# @param applies_to_all [Boolean, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
588
|
+
#
|
589
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
590
|
+
#
|
261
591
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
262
592
|
#
|
593
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
594
|
+
#
|
595
|
+
# @param filters [Array<Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
596
|
+
#
|
263
597
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
264
598
|
#
|
599
|
+
# @param price_type [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
600
|
+
#
|
265
601
|
# @param adjustment_type [Symbol, :amount_discount]
|
602
|
+
|
603
|
+
# If set, the adjustment will apply to every price on the subscription.
|
604
|
+
#
|
605
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount#applies_to_all
|
606
|
+
module AppliesToAll
|
607
|
+
extend Orb::Internal::Type::Enum
|
608
|
+
|
609
|
+
TRUE = true
|
610
|
+
|
611
|
+
# @!method self.values
|
612
|
+
# @return [Array<Boolean>]
|
613
|
+
end
|
614
|
+
|
615
|
+
class Filter < Orb::Internal::Type::BaseModel
|
616
|
+
# @!attribute field
|
617
|
+
# The property of the price to filter on.
|
618
|
+
#
|
619
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Field]
|
620
|
+
required :field,
|
621
|
+
enum: -> {
|
622
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Field
|
623
|
+
}
|
624
|
+
|
625
|
+
# @!attribute operator
|
626
|
+
# Should prices that match the filter be included or excluded.
|
627
|
+
#
|
628
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Operator]
|
629
|
+
required :operator,
|
630
|
+
enum: -> {
|
631
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Operator
|
632
|
+
}
|
633
|
+
|
634
|
+
# @!attribute values
|
635
|
+
# The IDs or values that match this filter.
|
636
|
+
#
|
637
|
+
# @return [Array<String>]
|
638
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
639
|
+
|
640
|
+
# @!method initialize(field:, operator:, values:)
|
641
|
+
# @param field [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Field] The property of the price to filter on.
|
642
|
+
#
|
643
|
+
# @param operator [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
644
|
+
#
|
645
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
646
|
+
|
647
|
+
# The property of the price to filter on.
|
648
|
+
#
|
649
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::Filter#field
|
650
|
+
module Field
|
651
|
+
extend Orb::Internal::Type::Enum
|
652
|
+
|
653
|
+
PRICE_ID = :price_id
|
654
|
+
ITEM_ID = :item_id
|
655
|
+
PRICE_TYPE = :price_type
|
656
|
+
CURRENCY = :currency
|
657
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
658
|
+
|
659
|
+
# @!method self.values
|
660
|
+
# @return [Array<Symbol>]
|
661
|
+
end
|
662
|
+
|
663
|
+
# Should prices that match the filter be included or excluded.
|
664
|
+
#
|
665
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount::Filter#operator
|
666
|
+
module Operator
|
667
|
+
extend Orb::Internal::Type::Enum
|
668
|
+
|
669
|
+
INCLUDES = :includes
|
670
|
+
EXCLUDES = :excludes
|
671
|
+
|
672
|
+
# @!method self.values
|
673
|
+
# @return [Array<Symbol>]
|
674
|
+
end
|
675
|
+
end
|
676
|
+
|
677
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
678
|
+
#
|
679
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::AmountDiscount#price_type
|
680
|
+
module PriceType
|
681
|
+
extend Orb::Internal::Type::Enum
|
682
|
+
|
683
|
+
USAGE = :usage
|
684
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
685
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
686
|
+
FIXED = :fixed
|
687
|
+
IN_ARREARS = :in_arrears
|
688
|
+
|
689
|
+
# @!method self.values
|
690
|
+
# @return [Array<Symbol>]
|
691
|
+
end
|
266
692
|
end
|
267
693
|
|
268
694
|
class Minimum < Orb::Internal::Type::BaseModel
|
@@ -282,12 +708,44 @@ module Orb
|
|
282
708
|
# @return [String]
|
283
709
|
required :minimum_amount, String
|
284
710
|
|
711
|
+
# @!attribute applies_to_all
|
712
|
+
# If set, the adjustment will apply to every price on the subscription.
|
713
|
+
#
|
714
|
+
# @return [Boolean, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::AppliesToAll, nil]
|
715
|
+
optional :applies_to_all,
|
716
|
+
enum: -> {
|
717
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::AppliesToAll
|
718
|
+
},
|
719
|
+
nil?: true
|
720
|
+
|
721
|
+
# @!attribute applies_to_item_ids
|
722
|
+
# The set of item IDs to which this adjustment applies.
|
723
|
+
#
|
724
|
+
# @return [Array<String>, nil]
|
725
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
726
|
+
|
285
727
|
# @!attribute applies_to_price_ids
|
286
728
|
# The set of price IDs to which this adjustment applies.
|
287
729
|
#
|
288
730
|
# @return [Array<String>, nil]
|
289
731
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
290
732
|
|
733
|
+
# @!attribute currency
|
734
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
735
|
+
#
|
736
|
+
# @return [String, nil]
|
737
|
+
optional :currency, String, nil?: true
|
738
|
+
|
739
|
+
# @!attribute filters
|
740
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
741
|
+
#
|
742
|
+
# @return [Array<Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::Filter>, nil]
|
743
|
+
optional :filters,
|
744
|
+
-> {
|
745
|
+
Orb::Internal::Type::ArrayOf[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::Filter]
|
746
|
+
},
|
747
|
+
nil?: true
|
748
|
+
|
291
749
|
# @!attribute is_invoice_level
|
292
750
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
293
751
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -295,7 +753,17 @@ module Orb
|
|
295
753
|
# @return [Boolean, nil]
|
296
754
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
297
755
|
|
298
|
-
# @!
|
756
|
+
# @!attribute price_type
|
757
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
758
|
+
#
|
759
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::PriceType, nil]
|
760
|
+
optional :price_type,
|
761
|
+
enum: -> {
|
762
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::PriceType
|
763
|
+
},
|
764
|
+
nil?: true
|
765
|
+
|
766
|
+
# @!method initialize(item_id:, minimum_amount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :minimum)
|
299
767
|
# Some parameter documentations has been truncated, see
|
300
768
|
# {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum}
|
301
769
|
# for more details.
|
@@ -304,30 +772,162 @@ module Orb
|
|
304
772
|
#
|
305
773
|
# @param minimum_amount [String]
|
306
774
|
#
|
775
|
+
# @param applies_to_all [Boolean, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
776
|
+
#
|
777
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
778
|
+
#
|
307
779
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
308
780
|
#
|
781
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
782
|
+
#
|
783
|
+
# @param filters [Array<Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
784
|
+
#
|
309
785
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
310
786
|
#
|
787
|
+
# @param price_type [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
788
|
+
#
|
311
789
|
# @param adjustment_type [Symbol, :minimum]
|
312
|
-
end
|
313
790
|
|
314
|
-
|
315
|
-
# @!attribute adjustment_type
|
791
|
+
# If set, the adjustment will apply to every price on the subscription.
|
316
792
|
#
|
317
|
-
#
|
318
|
-
|
793
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum#applies_to_all
|
794
|
+
module AppliesToAll
|
795
|
+
extend Orb::Internal::Type::Enum
|
796
|
+
|
797
|
+
TRUE = true
|
798
|
+
|
799
|
+
# @!method self.values
|
800
|
+
# @return [Array<Boolean>]
|
801
|
+
end
|
802
|
+
|
803
|
+
class Filter < Orb::Internal::Type::BaseModel
|
804
|
+
# @!attribute field
|
805
|
+
# The property of the price to filter on.
|
806
|
+
#
|
807
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::Filter::Field]
|
808
|
+
required :field,
|
809
|
+
enum: -> {
|
810
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::Filter::Field
|
811
|
+
}
|
812
|
+
|
813
|
+
# @!attribute operator
|
814
|
+
# Should prices that match the filter be included or excluded.
|
815
|
+
#
|
816
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::Filter::Operator]
|
817
|
+
required :operator,
|
818
|
+
enum: -> {
|
819
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::Filter::Operator
|
820
|
+
}
|
821
|
+
|
822
|
+
# @!attribute values
|
823
|
+
# The IDs or values that match this filter.
|
824
|
+
#
|
825
|
+
# @return [Array<String>]
|
826
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
827
|
+
|
828
|
+
# @!method initialize(field:, operator:, values:)
|
829
|
+
# @param field [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::Filter::Field] The property of the price to filter on.
|
830
|
+
#
|
831
|
+
# @param operator [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::Filter::Operator] Should prices that match the filter be included or excluded.
|
832
|
+
#
|
833
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
834
|
+
|
835
|
+
# The property of the price to filter on.
|
836
|
+
#
|
837
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::Filter#field
|
838
|
+
module Field
|
839
|
+
extend Orb::Internal::Type::Enum
|
840
|
+
|
841
|
+
PRICE_ID = :price_id
|
842
|
+
ITEM_ID = :item_id
|
843
|
+
PRICE_TYPE = :price_type
|
844
|
+
CURRENCY = :currency
|
845
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
846
|
+
|
847
|
+
# @!method self.values
|
848
|
+
# @return [Array<Symbol>]
|
849
|
+
end
|
850
|
+
|
851
|
+
# Should prices that match the filter be included or excluded.
|
852
|
+
#
|
853
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum::Filter#operator
|
854
|
+
module Operator
|
855
|
+
extend Orb::Internal::Type::Enum
|
856
|
+
|
857
|
+
INCLUDES = :includes
|
858
|
+
EXCLUDES = :excludes
|
859
|
+
|
860
|
+
# @!method self.values
|
861
|
+
# @return [Array<Symbol>]
|
862
|
+
end
|
863
|
+
end
|
864
|
+
|
865
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
866
|
+
#
|
867
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Minimum#price_type
|
868
|
+
module PriceType
|
869
|
+
extend Orb::Internal::Type::Enum
|
870
|
+
|
871
|
+
USAGE = :usage
|
872
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
873
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
874
|
+
FIXED = :fixed
|
875
|
+
IN_ARREARS = :in_arrears
|
876
|
+
|
877
|
+
# @!method self.values
|
878
|
+
# @return [Array<Symbol>]
|
879
|
+
end
|
880
|
+
end
|
881
|
+
|
882
|
+
class Maximum < Orb::Internal::Type::BaseModel
|
883
|
+
# @!attribute adjustment_type
|
884
|
+
#
|
885
|
+
# @return [Symbol, :maximum]
|
886
|
+
required :adjustment_type, const: :maximum
|
319
887
|
|
320
888
|
# @!attribute maximum_amount
|
321
889
|
#
|
322
890
|
# @return [String]
|
323
891
|
required :maximum_amount, String
|
324
892
|
|
893
|
+
# @!attribute applies_to_all
|
894
|
+
# If set, the adjustment will apply to every price on the subscription.
|
895
|
+
#
|
896
|
+
# @return [Boolean, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::AppliesToAll, nil]
|
897
|
+
optional :applies_to_all,
|
898
|
+
enum: -> {
|
899
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::AppliesToAll
|
900
|
+
},
|
901
|
+
nil?: true
|
902
|
+
|
903
|
+
# @!attribute applies_to_item_ids
|
904
|
+
# The set of item IDs to which this adjustment applies.
|
905
|
+
#
|
906
|
+
# @return [Array<String>, nil]
|
907
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
908
|
+
|
325
909
|
# @!attribute applies_to_price_ids
|
326
910
|
# The set of price IDs to which this adjustment applies.
|
327
911
|
#
|
328
912
|
# @return [Array<String>, nil]
|
329
913
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
330
914
|
|
915
|
+
# @!attribute currency
|
916
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
917
|
+
#
|
918
|
+
# @return [String, nil]
|
919
|
+
optional :currency, String, nil?: true
|
920
|
+
|
921
|
+
# @!attribute filters
|
922
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
923
|
+
#
|
924
|
+
# @return [Array<Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::Filter>, nil]
|
925
|
+
optional :filters,
|
926
|
+
-> {
|
927
|
+
Orb::Internal::Type::ArrayOf[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::Filter]
|
928
|
+
},
|
929
|
+
nil?: true
|
930
|
+
|
331
931
|
# @!attribute is_invoice_level
|
332
932
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
333
933
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -335,18 +935,128 @@ module Orb
|
|
335
935
|
# @return [Boolean, nil]
|
336
936
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
337
937
|
|
338
|
-
# @!
|
938
|
+
# @!attribute price_type
|
939
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
940
|
+
#
|
941
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::PriceType, nil]
|
942
|
+
optional :price_type,
|
943
|
+
enum: -> {
|
944
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::PriceType
|
945
|
+
},
|
946
|
+
nil?: true
|
947
|
+
|
948
|
+
# @!method initialize(maximum_amount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :maximum)
|
339
949
|
# Some parameter documentations has been truncated, see
|
340
950
|
# {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum}
|
341
951
|
# for more details.
|
342
952
|
#
|
343
953
|
# @param maximum_amount [String]
|
344
954
|
#
|
955
|
+
# @param applies_to_all [Boolean, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
956
|
+
#
|
957
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
958
|
+
#
|
345
959
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
346
960
|
#
|
961
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
962
|
+
#
|
963
|
+
# @param filters [Array<Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
964
|
+
#
|
347
965
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
348
966
|
#
|
967
|
+
# @param price_type [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
968
|
+
#
|
349
969
|
# @param adjustment_type [Symbol, :maximum]
|
970
|
+
|
971
|
+
# If set, the adjustment will apply to every price on the subscription.
|
972
|
+
#
|
973
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum#applies_to_all
|
974
|
+
module AppliesToAll
|
975
|
+
extend Orb::Internal::Type::Enum
|
976
|
+
|
977
|
+
TRUE = true
|
978
|
+
|
979
|
+
# @!method self.values
|
980
|
+
# @return [Array<Boolean>]
|
981
|
+
end
|
982
|
+
|
983
|
+
class Filter < Orb::Internal::Type::BaseModel
|
984
|
+
# @!attribute field
|
985
|
+
# The property of the price to filter on.
|
986
|
+
#
|
987
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::Filter::Field]
|
988
|
+
required :field,
|
989
|
+
enum: -> {
|
990
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::Filter::Field
|
991
|
+
}
|
992
|
+
|
993
|
+
# @!attribute operator
|
994
|
+
# Should prices that match the filter be included or excluded.
|
995
|
+
#
|
996
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::Filter::Operator]
|
997
|
+
required :operator,
|
998
|
+
enum: -> {
|
999
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::Filter::Operator
|
1000
|
+
}
|
1001
|
+
|
1002
|
+
# @!attribute values
|
1003
|
+
# The IDs or values that match this filter.
|
1004
|
+
#
|
1005
|
+
# @return [Array<String>]
|
1006
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
1007
|
+
|
1008
|
+
# @!method initialize(field:, operator:, values:)
|
1009
|
+
# @param field [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::Filter::Field] The property of the price to filter on.
|
1010
|
+
#
|
1011
|
+
# @param operator [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::Filter::Operator] Should prices that match the filter be included or excluded.
|
1012
|
+
#
|
1013
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
1014
|
+
|
1015
|
+
# The property of the price to filter on.
|
1016
|
+
#
|
1017
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::Filter#field
|
1018
|
+
module Field
|
1019
|
+
extend Orb::Internal::Type::Enum
|
1020
|
+
|
1021
|
+
PRICE_ID = :price_id
|
1022
|
+
ITEM_ID = :item_id
|
1023
|
+
PRICE_TYPE = :price_type
|
1024
|
+
CURRENCY = :currency
|
1025
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
1026
|
+
|
1027
|
+
# @!method self.values
|
1028
|
+
# @return [Array<Symbol>]
|
1029
|
+
end
|
1030
|
+
|
1031
|
+
# Should prices that match the filter be included or excluded.
|
1032
|
+
#
|
1033
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum::Filter#operator
|
1034
|
+
module Operator
|
1035
|
+
extend Orb::Internal::Type::Enum
|
1036
|
+
|
1037
|
+
INCLUDES = :includes
|
1038
|
+
EXCLUDES = :excludes
|
1039
|
+
|
1040
|
+
# @!method self.values
|
1041
|
+
# @return [Array<Symbol>]
|
1042
|
+
end
|
1043
|
+
end
|
1044
|
+
|
1045
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
1046
|
+
#
|
1047
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment::Adjustment::Maximum#price_type
|
1048
|
+
module PriceType
|
1049
|
+
extend Orb::Internal::Type::Enum
|
1050
|
+
|
1051
|
+
USAGE = :usage
|
1052
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
1053
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
1054
|
+
FIXED = :fixed
|
1055
|
+
IN_ARREARS = :in_arrears
|
1056
|
+
|
1057
|
+
# @!method self.values
|
1058
|
+
# @return [Array<Symbol>]
|
1059
|
+
end
|
350
1060
|
end
|
351
1061
|
|
352
1062
|
# @!method self.variants
|
@@ -9140,12 +9850,46 @@ module Orb
|
|
9140
9850
|
# @return [Float]
|
9141
9851
|
required :percentage_discount, Float
|
9142
9852
|
|
9853
|
+
# @!attribute applies_to_all
|
9854
|
+
# If set, the adjustment will apply to every price on the subscription.
|
9855
|
+
#
|
9856
|
+
# @return [Boolean, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::AppliesToAll, nil]
|
9857
|
+
optional :applies_to_all,
|
9858
|
+
enum: -> {
|
9859
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::AppliesToAll
|
9860
|
+
},
|
9861
|
+
nil?: true
|
9862
|
+
|
9863
|
+
# @!attribute applies_to_item_ids
|
9864
|
+
# The set of item IDs to which this adjustment applies.
|
9865
|
+
#
|
9866
|
+
# @return [Array<String>, nil]
|
9867
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
9868
|
+
|
9143
9869
|
# @!attribute applies_to_price_ids
|
9144
9870
|
# The set of price IDs to which this adjustment applies.
|
9145
9871
|
#
|
9146
9872
|
# @return [Array<String>, nil]
|
9147
9873
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
9148
9874
|
|
9875
|
+
# @!attribute currency
|
9876
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
9877
|
+
#
|
9878
|
+
# @return [String, nil]
|
9879
|
+
optional :currency, String, nil?: true
|
9880
|
+
|
9881
|
+
# @!attribute filters
|
9882
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
9883
|
+
#
|
9884
|
+
# @return [Array<Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter>, nil]
|
9885
|
+
optional :filters,
|
9886
|
+
-> do
|
9887
|
+
Orb::Internal::Type::ArrayOf[
|
9888
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter
|
9889
|
+
]
|
9890
|
+
end,
|
9891
|
+
nil?: true
|
9892
|
+
|
9149
9893
|
# @!attribute is_invoice_level
|
9150
9894
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
9151
9895
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -9153,18 +9897,128 @@ module Orb
|
|
9153
9897
|
# @return [Boolean, nil]
|
9154
9898
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
9155
9899
|
|
9156
|
-
# @!
|
9900
|
+
# @!attribute price_type
|
9901
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
9902
|
+
#
|
9903
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::PriceType, nil]
|
9904
|
+
optional :price_type,
|
9905
|
+
enum: -> {
|
9906
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::PriceType
|
9907
|
+
},
|
9908
|
+
nil?: true
|
9909
|
+
|
9910
|
+
# @!method initialize(percentage_discount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :percentage_discount)
|
9157
9911
|
# Some parameter documentations has been truncated, see
|
9158
9912
|
# {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount}
|
9159
9913
|
# for more details.
|
9160
9914
|
#
|
9161
9915
|
# @param percentage_discount [Float]
|
9162
9916
|
#
|
9917
|
+
# @param applies_to_all [Boolean, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
9918
|
+
#
|
9919
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
9920
|
+
#
|
9163
9921
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
9164
9922
|
#
|
9923
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
9924
|
+
#
|
9925
|
+
# @param filters [Array<Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
9926
|
+
#
|
9165
9927
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
9166
9928
|
#
|
9929
|
+
# @param price_type [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
9930
|
+
#
|
9167
9931
|
# @param adjustment_type [Symbol, :percentage_discount]
|
9932
|
+
|
9933
|
+
# If set, the adjustment will apply to every price on the subscription.
|
9934
|
+
#
|
9935
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount#applies_to_all
|
9936
|
+
module AppliesToAll
|
9937
|
+
extend Orb::Internal::Type::Enum
|
9938
|
+
|
9939
|
+
TRUE = true
|
9940
|
+
|
9941
|
+
# @!method self.values
|
9942
|
+
# @return [Array<Boolean>]
|
9943
|
+
end
|
9944
|
+
|
9945
|
+
class Filter < Orb::Internal::Type::BaseModel
|
9946
|
+
# @!attribute field
|
9947
|
+
# The property of the price to filter on.
|
9948
|
+
#
|
9949
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter::Field]
|
9950
|
+
required :field,
|
9951
|
+
enum: -> {
|
9952
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter::Field
|
9953
|
+
}
|
9954
|
+
|
9955
|
+
# @!attribute operator
|
9956
|
+
# Should prices that match the filter be included or excluded.
|
9957
|
+
#
|
9958
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter::Operator]
|
9959
|
+
required :operator,
|
9960
|
+
enum: -> {
|
9961
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter::Operator
|
9962
|
+
}
|
9963
|
+
|
9964
|
+
# @!attribute values
|
9965
|
+
# The IDs or values that match this filter.
|
9966
|
+
#
|
9967
|
+
# @return [Array<String>]
|
9968
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
9969
|
+
|
9970
|
+
# @!method initialize(field:, operator:, values:)
|
9971
|
+
# @param field [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter::Field] The property of the price to filter on.
|
9972
|
+
#
|
9973
|
+
# @param operator [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
9974
|
+
#
|
9975
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
9976
|
+
|
9977
|
+
# The property of the price to filter on.
|
9978
|
+
#
|
9979
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter#field
|
9980
|
+
module Field
|
9981
|
+
extend Orb::Internal::Type::Enum
|
9982
|
+
|
9983
|
+
PRICE_ID = :price_id
|
9984
|
+
ITEM_ID = :item_id
|
9985
|
+
PRICE_TYPE = :price_type
|
9986
|
+
CURRENCY = :currency
|
9987
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
9988
|
+
|
9989
|
+
# @!method self.values
|
9990
|
+
# @return [Array<Symbol>]
|
9991
|
+
end
|
9992
|
+
|
9993
|
+
# Should prices that match the filter be included or excluded.
|
9994
|
+
#
|
9995
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount::Filter#operator
|
9996
|
+
module Operator
|
9997
|
+
extend Orb::Internal::Type::Enum
|
9998
|
+
|
9999
|
+
INCLUDES = :includes
|
10000
|
+
EXCLUDES = :excludes
|
10001
|
+
|
10002
|
+
# @!method self.values
|
10003
|
+
# @return [Array<Symbol>]
|
10004
|
+
end
|
10005
|
+
end
|
10006
|
+
|
10007
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
10008
|
+
#
|
10009
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::PercentageDiscount#price_type
|
10010
|
+
module PriceType
|
10011
|
+
extend Orb::Internal::Type::Enum
|
10012
|
+
|
10013
|
+
USAGE = :usage
|
10014
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
10015
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
10016
|
+
FIXED = :fixed
|
10017
|
+
IN_ARREARS = :in_arrears
|
10018
|
+
|
10019
|
+
# @!method self.values
|
10020
|
+
# @return [Array<Symbol>]
|
10021
|
+
end
|
9168
10022
|
end
|
9169
10023
|
|
9170
10024
|
class UsageDiscount < Orb::Internal::Type::BaseModel
|
@@ -9178,12 +10032,44 @@ module Orb
|
|
9178
10032
|
# @return [Float]
|
9179
10033
|
required :usage_discount, Float
|
9180
10034
|
|
10035
|
+
# @!attribute applies_to_all
|
10036
|
+
# If set, the adjustment will apply to every price on the subscription.
|
10037
|
+
#
|
10038
|
+
# @return [Boolean, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::AppliesToAll, nil]
|
10039
|
+
optional :applies_to_all,
|
10040
|
+
enum: -> {
|
10041
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::AppliesToAll
|
10042
|
+
},
|
10043
|
+
nil?: true
|
10044
|
+
|
10045
|
+
# @!attribute applies_to_item_ids
|
10046
|
+
# The set of item IDs to which this adjustment applies.
|
10047
|
+
#
|
10048
|
+
# @return [Array<String>, nil]
|
10049
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
10050
|
+
|
9181
10051
|
# @!attribute applies_to_price_ids
|
9182
10052
|
# The set of price IDs to which this adjustment applies.
|
9183
10053
|
#
|
9184
10054
|
# @return [Array<String>, nil]
|
9185
10055
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
9186
10056
|
|
10057
|
+
# @!attribute currency
|
10058
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
10059
|
+
#
|
10060
|
+
# @return [String, nil]
|
10061
|
+
optional :currency, String, nil?: true
|
10062
|
+
|
10063
|
+
# @!attribute filters
|
10064
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
10065
|
+
#
|
10066
|
+
# @return [Array<Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter>, nil]
|
10067
|
+
optional :filters,
|
10068
|
+
-> {
|
10069
|
+
Orb::Internal::Type::ArrayOf[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter]
|
10070
|
+
},
|
10071
|
+
nil?: true
|
10072
|
+
|
9187
10073
|
# @!attribute is_invoice_level
|
9188
10074
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
9189
10075
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -9191,18 +10077,128 @@ module Orb
|
|
9191
10077
|
# @return [Boolean, nil]
|
9192
10078
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
9193
10079
|
|
9194
|
-
# @!
|
10080
|
+
# @!attribute price_type
|
10081
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
10082
|
+
#
|
10083
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::PriceType, nil]
|
10084
|
+
optional :price_type,
|
10085
|
+
enum: -> {
|
10086
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::PriceType
|
10087
|
+
},
|
10088
|
+
nil?: true
|
10089
|
+
|
10090
|
+
# @!method initialize(usage_discount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :usage_discount)
|
9195
10091
|
# Some parameter documentations has been truncated, see
|
9196
10092
|
# {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount}
|
9197
10093
|
# for more details.
|
9198
10094
|
#
|
9199
10095
|
# @param usage_discount [Float]
|
9200
10096
|
#
|
10097
|
+
# @param applies_to_all [Boolean, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
10098
|
+
#
|
10099
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
10100
|
+
#
|
9201
10101
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
9202
10102
|
#
|
10103
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
10104
|
+
#
|
10105
|
+
# @param filters [Array<Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
10106
|
+
#
|
9203
10107
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
9204
10108
|
#
|
10109
|
+
# @param price_type [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
10110
|
+
#
|
9205
10111
|
# @param adjustment_type [Symbol, :usage_discount]
|
10112
|
+
|
10113
|
+
# If set, the adjustment will apply to every price on the subscription.
|
10114
|
+
#
|
10115
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount#applies_to_all
|
10116
|
+
module AppliesToAll
|
10117
|
+
extend Orb::Internal::Type::Enum
|
10118
|
+
|
10119
|
+
TRUE = true
|
10120
|
+
|
10121
|
+
# @!method self.values
|
10122
|
+
# @return [Array<Boolean>]
|
10123
|
+
end
|
10124
|
+
|
10125
|
+
class Filter < Orb::Internal::Type::BaseModel
|
10126
|
+
# @!attribute field
|
10127
|
+
# The property of the price to filter on.
|
10128
|
+
#
|
10129
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter::Field]
|
10130
|
+
required :field,
|
10131
|
+
enum: -> {
|
10132
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter::Field
|
10133
|
+
}
|
10134
|
+
|
10135
|
+
# @!attribute operator
|
10136
|
+
# Should prices that match the filter be included or excluded.
|
10137
|
+
#
|
10138
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter::Operator]
|
10139
|
+
required :operator,
|
10140
|
+
enum: -> {
|
10141
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter::Operator
|
10142
|
+
}
|
10143
|
+
|
10144
|
+
# @!attribute values
|
10145
|
+
# The IDs or values that match this filter.
|
10146
|
+
#
|
10147
|
+
# @return [Array<String>]
|
10148
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
10149
|
+
|
10150
|
+
# @!method initialize(field:, operator:, values:)
|
10151
|
+
# @param field [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter::Field] The property of the price to filter on.
|
10152
|
+
#
|
10153
|
+
# @param operator [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
10154
|
+
#
|
10155
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
10156
|
+
|
10157
|
+
# The property of the price to filter on.
|
10158
|
+
#
|
10159
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter#field
|
10160
|
+
module Field
|
10161
|
+
extend Orb::Internal::Type::Enum
|
10162
|
+
|
10163
|
+
PRICE_ID = :price_id
|
10164
|
+
ITEM_ID = :item_id
|
10165
|
+
PRICE_TYPE = :price_type
|
10166
|
+
CURRENCY = :currency
|
10167
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
10168
|
+
|
10169
|
+
# @!method self.values
|
10170
|
+
# @return [Array<Symbol>]
|
10171
|
+
end
|
10172
|
+
|
10173
|
+
# Should prices that match the filter be included or excluded.
|
10174
|
+
#
|
10175
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount::Filter#operator
|
10176
|
+
module Operator
|
10177
|
+
extend Orb::Internal::Type::Enum
|
10178
|
+
|
10179
|
+
INCLUDES = :includes
|
10180
|
+
EXCLUDES = :excludes
|
10181
|
+
|
10182
|
+
# @!method self.values
|
10183
|
+
# @return [Array<Symbol>]
|
10184
|
+
end
|
10185
|
+
end
|
10186
|
+
|
10187
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
10188
|
+
#
|
10189
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::UsageDiscount#price_type
|
10190
|
+
module PriceType
|
10191
|
+
extend Orb::Internal::Type::Enum
|
10192
|
+
|
10193
|
+
USAGE = :usage
|
10194
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
10195
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
10196
|
+
FIXED = :fixed
|
10197
|
+
IN_ARREARS = :in_arrears
|
10198
|
+
|
10199
|
+
# @!method self.values
|
10200
|
+
# @return [Array<Symbol>]
|
10201
|
+
end
|
9206
10202
|
end
|
9207
10203
|
|
9208
10204
|
class AmountDiscount < Orb::Internal::Type::BaseModel
|
@@ -9216,12 +10212,44 @@ module Orb
|
|
9216
10212
|
# @return [String]
|
9217
10213
|
required :amount_discount, String
|
9218
10214
|
|
10215
|
+
# @!attribute applies_to_all
|
10216
|
+
# If set, the adjustment will apply to every price on the subscription.
|
10217
|
+
#
|
10218
|
+
# @return [Boolean, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::AppliesToAll, nil]
|
10219
|
+
optional :applies_to_all,
|
10220
|
+
enum: -> {
|
10221
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::AppliesToAll
|
10222
|
+
},
|
10223
|
+
nil?: true
|
10224
|
+
|
10225
|
+
# @!attribute applies_to_item_ids
|
10226
|
+
# The set of item IDs to which this adjustment applies.
|
10227
|
+
#
|
10228
|
+
# @return [Array<String>, nil]
|
10229
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
10230
|
+
|
9219
10231
|
# @!attribute applies_to_price_ids
|
9220
10232
|
# The set of price IDs to which this adjustment applies.
|
9221
10233
|
#
|
9222
10234
|
# @return [Array<String>, nil]
|
9223
10235
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
9224
10236
|
|
10237
|
+
# @!attribute currency
|
10238
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
10239
|
+
#
|
10240
|
+
# @return [String, nil]
|
10241
|
+
optional :currency, String, nil?: true
|
10242
|
+
|
10243
|
+
# @!attribute filters
|
10244
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
10245
|
+
#
|
10246
|
+
# @return [Array<Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter>, nil]
|
10247
|
+
optional :filters,
|
10248
|
+
-> {
|
10249
|
+
Orb::Internal::Type::ArrayOf[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter]
|
10250
|
+
},
|
10251
|
+
nil?: true
|
10252
|
+
|
9225
10253
|
# @!attribute is_invoice_level
|
9226
10254
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
9227
10255
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -9229,18 +10257,128 @@ module Orb
|
|
9229
10257
|
# @return [Boolean, nil]
|
9230
10258
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
9231
10259
|
|
9232
|
-
# @!
|
10260
|
+
# @!attribute price_type
|
10261
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
10262
|
+
#
|
10263
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::PriceType, nil]
|
10264
|
+
optional :price_type,
|
10265
|
+
enum: -> {
|
10266
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::PriceType
|
10267
|
+
},
|
10268
|
+
nil?: true
|
10269
|
+
|
10270
|
+
# @!method initialize(amount_discount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :amount_discount)
|
9233
10271
|
# Some parameter documentations has been truncated, see
|
9234
10272
|
# {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount}
|
9235
10273
|
# for more details.
|
9236
10274
|
#
|
9237
10275
|
# @param amount_discount [String]
|
9238
10276
|
#
|
10277
|
+
# @param applies_to_all [Boolean, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
10278
|
+
#
|
10279
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
10280
|
+
#
|
9239
10281
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
9240
10282
|
#
|
10283
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
10284
|
+
#
|
10285
|
+
# @param filters [Array<Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
10286
|
+
#
|
9241
10287
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
9242
10288
|
#
|
10289
|
+
# @param price_type [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
10290
|
+
#
|
9243
10291
|
# @param adjustment_type [Symbol, :amount_discount]
|
10292
|
+
|
10293
|
+
# If set, the adjustment will apply to every price on the subscription.
|
10294
|
+
#
|
10295
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount#applies_to_all
|
10296
|
+
module AppliesToAll
|
10297
|
+
extend Orb::Internal::Type::Enum
|
10298
|
+
|
10299
|
+
TRUE = true
|
10300
|
+
|
10301
|
+
# @!method self.values
|
10302
|
+
# @return [Array<Boolean>]
|
10303
|
+
end
|
10304
|
+
|
10305
|
+
class Filter < Orb::Internal::Type::BaseModel
|
10306
|
+
# @!attribute field
|
10307
|
+
# The property of the price to filter on.
|
10308
|
+
#
|
10309
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter::Field]
|
10310
|
+
required :field,
|
10311
|
+
enum: -> {
|
10312
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter::Field
|
10313
|
+
}
|
10314
|
+
|
10315
|
+
# @!attribute operator
|
10316
|
+
# Should prices that match the filter be included or excluded.
|
10317
|
+
#
|
10318
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter::Operator]
|
10319
|
+
required :operator,
|
10320
|
+
enum: -> {
|
10321
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter::Operator
|
10322
|
+
}
|
10323
|
+
|
10324
|
+
# @!attribute values
|
10325
|
+
# The IDs or values that match this filter.
|
10326
|
+
#
|
10327
|
+
# @return [Array<String>]
|
10328
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
10329
|
+
|
10330
|
+
# @!method initialize(field:, operator:, values:)
|
10331
|
+
# @param field [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter::Field] The property of the price to filter on.
|
10332
|
+
#
|
10333
|
+
# @param operator [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
10334
|
+
#
|
10335
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
10336
|
+
|
10337
|
+
# The property of the price to filter on.
|
10338
|
+
#
|
10339
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter#field
|
10340
|
+
module Field
|
10341
|
+
extend Orb::Internal::Type::Enum
|
10342
|
+
|
10343
|
+
PRICE_ID = :price_id
|
10344
|
+
ITEM_ID = :item_id
|
10345
|
+
PRICE_TYPE = :price_type
|
10346
|
+
CURRENCY = :currency
|
10347
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
10348
|
+
|
10349
|
+
# @!method self.values
|
10350
|
+
# @return [Array<Symbol>]
|
10351
|
+
end
|
10352
|
+
|
10353
|
+
# Should prices that match the filter be included or excluded.
|
10354
|
+
#
|
10355
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount::Filter#operator
|
10356
|
+
module Operator
|
10357
|
+
extend Orb::Internal::Type::Enum
|
10358
|
+
|
10359
|
+
INCLUDES = :includes
|
10360
|
+
EXCLUDES = :excludes
|
10361
|
+
|
10362
|
+
# @!method self.values
|
10363
|
+
# @return [Array<Symbol>]
|
10364
|
+
end
|
10365
|
+
end
|
10366
|
+
|
10367
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
10368
|
+
#
|
10369
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::AmountDiscount#price_type
|
10370
|
+
module PriceType
|
10371
|
+
extend Orb::Internal::Type::Enum
|
10372
|
+
|
10373
|
+
USAGE = :usage
|
10374
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
10375
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
10376
|
+
FIXED = :fixed
|
10377
|
+
IN_ARREARS = :in_arrears
|
10378
|
+
|
10379
|
+
# @!method self.values
|
10380
|
+
# @return [Array<Symbol>]
|
10381
|
+
end
|
9244
10382
|
end
|
9245
10383
|
|
9246
10384
|
class Minimum < Orb::Internal::Type::BaseModel
|
@@ -9260,12 +10398,44 @@ module Orb
|
|
9260
10398
|
# @return [String]
|
9261
10399
|
required :minimum_amount, String
|
9262
10400
|
|
10401
|
+
# @!attribute applies_to_all
|
10402
|
+
# If set, the adjustment will apply to every price on the subscription.
|
10403
|
+
#
|
10404
|
+
# @return [Boolean, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::AppliesToAll, nil]
|
10405
|
+
optional :applies_to_all,
|
10406
|
+
enum: -> {
|
10407
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::AppliesToAll
|
10408
|
+
},
|
10409
|
+
nil?: true
|
10410
|
+
|
10411
|
+
# @!attribute applies_to_item_ids
|
10412
|
+
# The set of item IDs to which this adjustment applies.
|
10413
|
+
#
|
10414
|
+
# @return [Array<String>, nil]
|
10415
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
10416
|
+
|
9263
10417
|
# @!attribute applies_to_price_ids
|
9264
10418
|
# The set of price IDs to which this adjustment applies.
|
9265
10419
|
#
|
9266
10420
|
# @return [Array<String>, nil]
|
9267
10421
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
9268
10422
|
|
10423
|
+
# @!attribute currency
|
10424
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
10425
|
+
#
|
10426
|
+
# @return [String, nil]
|
10427
|
+
optional :currency, String, nil?: true
|
10428
|
+
|
10429
|
+
# @!attribute filters
|
10430
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
10431
|
+
#
|
10432
|
+
# @return [Array<Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::Filter>, nil]
|
10433
|
+
optional :filters,
|
10434
|
+
-> {
|
10435
|
+
Orb::Internal::Type::ArrayOf[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::Filter]
|
10436
|
+
},
|
10437
|
+
nil?: true
|
10438
|
+
|
9269
10439
|
# @!attribute is_invoice_level
|
9270
10440
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
9271
10441
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -9273,7 +10443,17 @@ module Orb
|
|
9273
10443
|
# @return [Boolean, nil]
|
9274
10444
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
9275
10445
|
|
9276
|
-
# @!
|
10446
|
+
# @!attribute price_type
|
10447
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
10448
|
+
#
|
10449
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::PriceType, nil]
|
10450
|
+
optional :price_type,
|
10451
|
+
enum: -> {
|
10452
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::PriceType
|
10453
|
+
},
|
10454
|
+
nil?: true
|
10455
|
+
|
10456
|
+
# @!method initialize(item_id:, minimum_amount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :minimum)
|
9277
10457
|
# Some parameter documentations has been truncated, see
|
9278
10458
|
# {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum}
|
9279
10459
|
# for more details.
|
@@ -9282,11 +10462,111 @@ module Orb
|
|
9282
10462
|
#
|
9283
10463
|
# @param minimum_amount [String]
|
9284
10464
|
#
|
10465
|
+
# @param applies_to_all [Boolean, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
10466
|
+
#
|
10467
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
10468
|
+
#
|
9285
10469
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
9286
10470
|
#
|
10471
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
10472
|
+
#
|
10473
|
+
# @param filters [Array<Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
10474
|
+
#
|
9287
10475
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
9288
10476
|
#
|
10477
|
+
# @param price_type [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
10478
|
+
#
|
9289
10479
|
# @param adjustment_type [Symbol, :minimum]
|
10480
|
+
|
10481
|
+
# If set, the adjustment will apply to every price on the subscription.
|
10482
|
+
#
|
10483
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum#applies_to_all
|
10484
|
+
module AppliesToAll
|
10485
|
+
extend Orb::Internal::Type::Enum
|
10486
|
+
|
10487
|
+
TRUE = true
|
10488
|
+
|
10489
|
+
# @!method self.values
|
10490
|
+
# @return [Array<Boolean>]
|
10491
|
+
end
|
10492
|
+
|
10493
|
+
class Filter < Orb::Internal::Type::BaseModel
|
10494
|
+
# @!attribute field
|
10495
|
+
# The property of the price to filter on.
|
10496
|
+
#
|
10497
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::Filter::Field]
|
10498
|
+
required :field,
|
10499
|
+
enum: -> {
|
10500
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::Filter::Field
|
10501
|
+
}
|
10502
|
+
|
10503
|
+
# @!attribute operator
|
10504
|
+
# Should prices that match the filter be included or excluded.
|
10505
|
+
#
|
10506
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::Filter::Operator]
|
10507
|
+
required :operator,
|
10508
|
+
enum: -> {
|
10509
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::Filter::Operator
|
10510
|
+
}
|
10511
|
+
|
10512
|
+
# @!attribute values
|
10513
|
+
# The IDs or values that match this filter.
|
10514
|
+
#
|
10515
|
+
# @return [Array<String>]
|
10516
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
10517
|
+
|
10518
|
+
# @!method initialize(field:, operator:, values:)
|
10519
|
+
# @param field [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::Filter::Field] The property of the price to filter on.
|
10520
|
+
#
|
10521
|
+
# @param operator [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::Filter::Operator] Should prices that match the filter be included or excluded.
|
10522
|
+
#
|
10523
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
10524
|
+
|
10525
|
+
# The property of the price to filter on.
|
10526
|
+
#
|
10527
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::Filter#field
|
10528
|
+
module Field
|
10529
|
+
extend Orb::Internal::Type::Enum
|
10530
|
+
|
10531
|
+
PRICE_ID = :price_id
|
10532
|
+
ITEM_ID = :item_id
|
10533
|
+
PRICE_TYPE = :price_type
|
10534
|
+
CURRENCY = :currency
|
10535
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
10536
|
+
|
10537
|
+
# @!method self.values
|
10538
|
+
# @return [Array<Symbol>]
|
10539
|
+
end
|
10540
|
+
|
10541
|
+
# Should prices that match the filter be included or excluded.
|
10542
|
+
#
|
10543
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum::Filter#operator
|
10544
|
+
module Operator
|
10545
|
+
extend Orb::Internal::Type::Enum
|
10546
|
+
|
10547
|
+
INCLUDES = :includes
|
10548
|
+
EXCLUDES = :excludes
|
10549
|
+
|
10550
|
+
# @!method self.values
|
10551
|
+
# @return [Array<Symbol>]
|
10552
|
+
end
|
10553
|
+
end
|
10554
|
+
|
10555
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
10556
|
+
#
|
10557
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Minimum#price_type
|
10558
|
+
module PriceType
|
10559
|
+
extend Orb::Internal::Type::Enum
|
10560
|
+
|
10561
|
+
USAGE = :usage
|
10562
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
10563
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
10564
|
+
FIXED = :fixed
|
10565
|
+
IN_ARREARS = :in_arrears
|
10566
|
+
|
10567
|
+
# @!method self.values
|
10568
|
+
# @return [Array<Symbol>]
|
10569
|
+
end
|
9290
10570
|
end
|
9291
10571
|
|
9292
10572
|
class Maximum < Orb::Internal::Type::BaseModel
|
@@ -9300,12 +10580,44 @@ module Orb
|
|
9300
10580
|
# @return [String]
|
9301
10581
|
required :maximum_amount, String
|
9302
10582
|
|
10583
|
+
# @!attribute applies_to_all
|
10584
|
+
# If set, the adjustment will apply to every price on the subscription.
|
10585
|
+
#
|
10586
|
+
# @return [Boolean, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::AppliesToAll, nil]
|
10587
|
+
optional :applies_to_all,
|
10588
|
+
enum: -> {
|
10589
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::AppliesToAll
|
10590
|
+
},
|
10591
|
+
nil?: true
|
10592
|
+
|
10593
|
+
# @!attribute applies_to_item_ids
|
10594
|
+
# The set of item IDs to which this adjustment applies.
|
10595
|
+
#
|
10596
|
+
# @return [Array<String>, nil]
|
10597
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
10598
|
+
|
9303
10599
|
# @!attribute applies_to_price_ids
|
9304
10600
|
# The set of price IDs to which this adjustment applies.
|
9305
10601
|
#
|
9306
10602
|
# @return [Array<String>, nil]
|
9307
10603
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
9308
10604
|
|
10605
|
+
# @!attribute currency
|
10606
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
10607
|
+
#
|
10608
|
+
# @return [String, nil]
|
10609
|
+
optional :currency, String, nil?: true
|
10610
|
+
|
10611
|
+
# @!attribute filters
|
10612
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
10613
|
+
#
|
10614
|
+
# @return [Array<Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::Filter>, nil]
|
10615
|
+
optional :filters,
|
10616
|
+
-> {
|
10617
|
+
Orb::Internal::Type::ArrayOf[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::Filter]
|
10618
|
+
},
|
10619
|
+
nil?: true
|
10620
|
+
|
9309
10621
|
# @!attribute is_invoice_level
|
9310
10622
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
9311
10623
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -9313,18 +10625,128 @@ module Orb
|
|
9313
10625
|
# @return [Boolean, nil]
|
9314
10626
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
9315
10627
|
|
9316
|
-
# @!
|
10628
|
+
# @!attribute price_type
|
10629
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
10630
|
+
#
|
10631
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::PriceType, nil]
|
10632
|
+
optional :price_type,
|
10633
|
+
enum: -> {
|
10634
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::PriceType
|
10635
|
+
},
|
10636
|
+
nil?: true
|
10637
|
+
|
10638
|
+
# @!method initialize(maximum_amount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :maximum)
|
9317
10639
|
# Some parameter documentations has been truncated, see
|
9318
10640
|
# {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum}
|
9319
10641
|
# for more details.
|
9320
10642
|
#
|
9321
10643
|
# @param maximum_amount [String]
|
9322
10644
|
#
|
10645
|
+
# @param applies_to_all [Boolean, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
10646
|
+
#
|
10647
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
10648
|
+
#
|
9323
10649
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
9324
10650
|
#
|
10651
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
10652
|
+
#
|
10653
|
+
# @param filters [Array<Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
10654
|
+
#
|
9325
10655
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
9326
10656
|
#
|
10657
|
+
# @param price_type [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
10658
|
+
#
|
9327
10659
|
# @param adjustment_type [Symbol, :maximum]
|
10660
|
+
|
10661
|
+
# If set, the adjustment will apply to every price on the subscription.
|
10662
|
+
#
|
10663
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum#applies_to_all
|
10664
|
+
module AppliesToAll
|
10665
|
+
extend Orb::Internal::Type::Enum
|
10666
|
+
|
10667
|
+
TRUE = true
|
10668
|
+
|
10669
|
+
# @!method self.values
|
10670
|
+
# @return [Array<Boolean>]
|
10671
|
+
end
|
10672
|
+
|
10673
|
+
class Filter < Orb::Internal::Type::BaseModel
|
10674
|
+
# @!attribute field
|
10675
|
+
# The property of the price to filter on.
|
10676
|
+
#
|
10677
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::Filter::Field]
|
10678
|
+
required :field,
|
10679
|
+
enum: -> {
|
10680
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::Filter::Field
|
10681
|
+
}
|
10682
|
+
|
10683
|
+
# @!attribute operator
|
10684
|
+
# Should prices that match the filter be included or excluded.
|
10685
|
+
#
|
10686
|
+
# @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::Filter::Operator]
|
10687
|
+
required :operator,
|
10688
|
+
enum: -> {
|
10689
|
+
Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::Filter::Operator
|
10690
|
+
}
|
10691
|
+
|
10692
|
+
# @!attribute values
|
10693
|
+
# The IDs or values that match this filter.
|
10694
|
+
#
|
10695
|
+
# @return [Array<String>]
|
10696
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
10697
|
+
|
10698
|
+
# @!method initialize(field:, operator:, values:)
|
10699
|
+
# @param field [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::Filter::Field] The property of the price to filter on.
|
10700
|
+
#
|
10701
|
+
# @param operator [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::Filter::Operator] Should prices that match the filter be included or excluded.
|
10702
|
+
#
|
10703
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
10704
|
+
|
10705
|
+
# The property of the price to filter on.
|
10706
|
+
#
|
10707
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::Filter#field
|
10708
|
+
module Field
|
10709
|
+
extend Orb::Internal::Type::Enum
|
10710
|
+
|
10711
|
+
PRICE_ID = :price_id
|
10712
|
+
ITEM_ID = :item_id
|
10713
|
+
PRICE_TYPE = :price_type
|
10714
|
+
CURRENCY = :currency
|
10715
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
10716
|
+
|
10717
|
+
# @!method self.values
|
10718
|
+
# @return [Array<Symbol>]
|
10719
|
+
end
|
10720
|
+
|
10721
|
+
# Should prices that match the filter be included or excluded.
|
10722
|
+
#
|
10723
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum::Filter#operator
|
10724
|
+
module Operator
|
10725
|
+
extend Orb::Internal::Type::Enum
|
10726
|
+
|
10727
|
+
INCLUDES = :includes
|
10728
|
+
EXCLUDES = :excludes
|
10729
|
+
|
10730
|
+
# @!method self.values
|
10731
|
+
# @return [Array<Symbol>]
|
10732
|
+
end
|
10733
|
+
end
|
10734
|
+
|
10735
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
10736
|
+
#
|
10737
|
+
# @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Maximum#price_type
|
10738
|
+
module PriceType
|
10739
|
+
extend Orb::Internal::Type::Enum
|
10740
|
+
|
10741
|
+
USAGE = :usage
|
10742
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
10743
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
10744
|
+
FIXED = :fixed
|
10745
|
+
IN_ARREARS = :in_arrears
|
10746
|
+
|
10747
|
+
# @!method self.values
|
10748
|
+
# @return [Array<Symbol>]
|
10749
|
+
end
|
9328
10750
|
end
|
9329
10751
|
|
9330
10752
|
# @!method self.variants
|