orb-billing 1.23.0 → 1.25.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 +15 -0
- data/README.md +1 -1
- data/lib/orb/models/alert.rb +4 -2
- data/lib/orb/models/alert_update_params.rb +5 -3
- data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +530 -6
- data/lib/orb/models/beta_create_plan_version_params.rb +526 -6
- data/lib/orb/models/changed_subscription_resources.rb +5 -5
- data/lib/orb/models/invoice.rb +5 -5
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +5 -5
- data/lib/orb/models/invoice_issue_summary_response.rb +3 -3
- data/lib/orb/models/invoice_line_item_create_response.rb +2 -2
- data/lib/orb/models/invoice_list_summary_response.rb +3 -3
- data/lib/orb/models/per_price_cost.rb +2 -2
- data/lib/orb/models/plan.rb +2 -2
- data/lib/orb/models/plan_create_params.rb +259 -3
- data/lib/orb/models/plan_version.rb +2 -2
- data/lib/orb/models/price.rb +433 -1
- data/lib/orb/models/price_create_params.rb +244 -3
- data/lib/orb/models/price_evaluate_multiple_params.rb +255 -3
- data/lib/orb/models/price_evaluate_preview_events_params.rb +255 -3
- data/lib/orb/models/price_interval.rb +2 -2
- data/lib/orb/models/subscription_create_params.rb +521 -6
- data/lib/orb/models/subscription_price_intervals_params.rb +251 -3
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +530 -6
- data/lib/orb/resources/alerts.rb +5 -2
- data/lib/orb/resources/customers/costs.rb +20 -0
- data/lib/orb/resources/licenses/external_licenses.rb +7 -0
- data/lib/orb/resources/licenses/usage.rb +3 -0
- data/lib/orb/resources/prices/external_price_id.rb +2 -2
- data/lib/orb/resources/prices.rb +5 -5
- data/lib/orb/version.rb +1 -1
- data/rbi/orb/models/alert.rbi +6 -2
- data/rbi/orb/models/alert_update_params.rbi +8 -4
- data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +2789 -1903
- data/rbi/orb/models/beta_create_plan_version_params.rbi +2788 -1902
- data/rbi/orb/models/changed_subscription_resources.rbi +7 -6
- data/rbi/orb/models/invoice.rbi +7 -6
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +7 -6
- data/rbi/orb/models/invoice_issue_summary_response.rbi +6 -6
- data/rbi/orb/models/invoice_line_item_create_response.rbi +1 -0
- data/rbi/orb/models/invoice_list_summary_response.rbi +6 -6
- data/rbi/orb/models/per_price_cost.rbi +1 -0
- data/rbi/orb/models/plan.rbi +1 -0
- data/rbi/orb/models/plan_create_params.rbi +443 -0
- data/rbi/orb/models/plan_version.rbi +1 -0
- data/rbi/orb/models/price.rbi +766 -0
- data/rbi/orb/models/price_create_params.rbi +431 -0
- data/rbi/orb/models/price_evaluate_multiple_params.rbi +431 -0
- data/rbi/orb/models/price_evaluate_preview_events_params.rbi +431 -0
- data/rbi/orb/models/price_interval.rbi +1 -0
- data/rbi/orb/models/subscription_create_params.rbi +2489 -1603
- data/rbi/orb/models/subscription_price_intervals_params.rbi +431 -0
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +2483 -1597
- data/rbi/orb/resources/alerts.rbi +8 -3
- data/rbi/orb/resources/customers/costs.rbi +20 -0
- data/rbi/orb/resources/licenses/external_licenses.rbi +7 -0
- data/rbi/orb/resources/licenses/usage.rbi +3 -0
- data/rbi/orb/resources/prices.rbi +1 -0
- data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +366 -0
- data/sig/orb/models/beta_create_plan_version_params.rbs +366 -0
- data/sig/orb/models/plan_create_params.rbs +183 -0
- data/sig/orb/models/price.rbs +327 -0
- data/sig/orb/models/price_create_params.rbs +173 -0
- data/sig/orb/models/price_evaluate_multiple_params.rbs +178 -0
- data/sig/orb/models/price_evaluate_preview_events_params.rbs +178 -0
- data/sig/orb/models/subscription_create_params.rbs +366 -0
- data/sig/orb/models/subscription_price_intervals_params.rbs +178 -0
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +366 -0
- metadata +1 -1
|
@@ -874,9 +874,9 @@ module Orb
|
|
|
874
874
|
# If Orb has ever attempted payment auto-collection for this invoice, this field
|
|
875
875
|
# will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
|
|
876
876
|
# this can be used to tell whether the invoice is currently in dunning (that is,
|
|
877
|
-
# `previously_attempted_at` is non-null, and `
|
|
878
|
-
#
|
|
879
|
-
# `
|
|
877
|
+
# `previously_attempted_at` is non-null, and `next_attempt_at` is non-null), or if
|
|
878
|
+
# dunning has been exhausted (`previously_attempted_at` is non-null, but
|
|
879
|
+
# `next_attempt_at` is null).
|
|
880
880
|
sig { returns(T.nilable(Time)) }
|
|
881
881
|
attr_accessor :previously_attempted_at
|
|
882
882
|
|
|
@@ -900,9 +900,9 @@ module Orb
|
|
|
900
900
|
# If Orb has ever attempted payment auto-collection for this invoice, this field
|
|
901
901
|
# will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
|
|
902
902
|
# this can be used to tell whether the invoice is currently in dunning (that is,
|
|
903
|
-
# `previously_attempted_at` is non-null, and `
|
|
904
|
-
#
|
|
905
|
-
# `
|
|
903
|
+
# `previously_attempted_at` is non-null, and `next_attempt_at` is non-null), or if
|
|
904
|
+
# dunning has been exhausted (`previously_attempted_at` is non-null, but
|
|
905
|
+
# `next_attempt_at` is null).
|
|
906
906
|
previously_attempted_at:
|
|
907
907
|
)
|
|
908
908
|
end
|
|
@@ -1406,6 +1406,7 @@ module Orb
|
|
|
1406
1406
|
Orb::Price::TieredPackage::OrHash,
|
|
1407
1407
|
Orb::Price::TieredWithMinimum::OrHash,
|
|
1408
1408
|
Orb::Price::GroupedTiered::OrHash,
|
|
1409
|
+
Orb::Price::GroupedTieredMatrix::OrHash,
|
|
1409
1410
|
Orb::Price::TieredPackageWithMinimum::OrHash,
|
|
1410
1411
|
Orb::Price::PackageWithAllocation::OrHash,
|
|
1411
1412
|
Orb::Price::UnitWithPercent::OrHash,
|
data/rbi/orb/models/invoice.rbi
CHANGED
|
@@ -732,9 +732,9 @@ module Orb
|
|
|
732
732
|
# If Orb has ever attempted payment auto-collection for this invoice, this field
|
|
733
733
|
# will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
|
|
734
734
|
# this can be used to tell whether the invoice is currently in dunning (that is,
|
|
735
|
-
# `previously_attempted_at` is non-null, and `
|
|
736
|
-
#
|
|
737
|
-
# `
|
|
735
|
+
# `previously_attempted_at` is non-null, and `next_attempt_at` is non-null), or if
|
|
736
|
+
# dunning has been exhausted (`previously_attempted_at` is non-null, but
|
|
737
|
+
# `next_attempt_at` is null).
|
|
738
738
|
sig { returns(T.nilable(Time)) }
|
|
739
739
|
attr_accessor :previously_attempted_at
|
|
740
740
|
|
|
@@ -758,9 +758,9 @@ module Orb
|
|
|
758
758
|
# If Orb has ever attempted payment auto-collection for this invoice, this field
|
|
759
759
|
# will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
|
|
760
760
|
# this can be used to tell whether the invoice is currently in dunning (that is,
|
|
761
|
-
# `previously_attempted_at` is non-null, and `
|
|
762
|
-
#
|
|
763
|
-
# `
|
|
761
|
+
# `previously_attempted_at` is non-null, and `next_attempt_at` is non-null), or if
|
|
762
|
+
# dunning has been exhausted (`previously_attempted_at` is non-null, but
|
|
763
|
+
# `next_attempt_at` is null).
|
|
764
764
|
previously_attempted_at:
|
|
765
765
|
)
|
|
766
766
|
end
|
|
@@ -1211,6 +1211,7 @@ module Orb
|
|
|
1211
1211
|
Orb::Price::TieredPackage::OrHash,
|
|
1212
1212
|
Orb::Price::TieredWithMinimum::OrHash,
|
|
1213
1213
|
Orb::Price::GroupedTiered::OrHash,
|
|
1214
|
+
Orb::Price::GroupedTieredMatrix::OrHash,
|
|
1214
1215
|
Orb::Price::TieredPackageWithMinimum::OrHash,
|
|
1215
1216
|
Orb::Price::PackageWithAllocation::OrHash,
|
|
1216
1217
|
Orb::Price::UnitWithPercent::OrHash,
|
|
@@ -784,9 +784,9 @@ module Orb
|
|
|
784
784
|
# If Orb has ever attempted payment auto-collection for this invoice, this field
|
|
785
785
|
# will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
|
|
786
786
|
# this can be used to tell whether the invoice is currently in dunning (that is,
|
|
787
|
-
# `previously_attempted_at` is non-null, and `
|
|
788
|
-
#
|
|
789
|
-
# `
|
|
787
|
+
# `previously_attempted_at` is non-null, and `next_attempt_at` is non-null), or if
|
|
788
|
+
# dunning has been exhausted (`previously_attempted_at` is non-null, but
|
|
789
|
+
# `next_attempt_at` is null).
|
|
790
790
|
sig { returns(T.nilable(Time)) }
|
|
791
791
|
attr_accessor :previously_attempted_at
|
|
792
792
|
|
|
@@ -810,9 +810,9 @@ module Orb
|
|
|
810
810
|
# If Orb has ever attempted payment auto-collection for this invoice, this field
|
|
811
811
|
# will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
|
|
812
812
|
# this can be used to tell whether the invoice is currently in dunning (that is,
|
|
813
|
-
# `previously_attempted_at` is non-null, and `
|
|
814
|
-
#
|
|
815
|
-
# `
|
|
813
|
+
# `previously_attempted_at` is non-null, and `next_attempt_at` is non-null), or if
|
|
814
|
+
# dunning has been exhausted (`previously_attempted_at` is non-null, but
|
|
815
|
+
# `next_attempt_at` is null).
|
|
816
816
|
previously_attempted_at:
|
|
817
817
|
)
|
|
818
818
|
end
|
|
@@ -1314,6 +1314,7 @@ module Orb
|
|
|
1314
1314
|
Orb::Price::TieredPackage::OrHash,
|
|
1315
1315
|
Orb::Price::TieredWithMinimum::OrHash,
|
|
1316
1316
|
Orb::Price::GroupedTiered::OrHash,
|
|
1317
|
+
Orb::Price::GroupedTieredMatrix::OrHash,
|
|
1317
1318
|
Orb::Price::TieredPackageWithMinimum::OrHash,
|
|
1318
1319
|
Orb::Price::PackageWithAllocation::OrHash,
|
|
1319
1320
|
Orb::Price::UnitWithPercent::OrHash,
|
|
@@ -707,9 +707,9 @@ module Orb
|
|
|
707
707
|
# If Orb has ever attempted payment auto-collection for this invoice, this field
|
|
708
708
|
# will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
|
|
709
709
|
# this can be used to tell whether the invoice is currently in dunning (that is,
|
|
710
|
-
# `previously_attempted_at` is non-null, and `
|
|
711
|
-
#
|
|
712
|
-
# `
|
|
710
|
+
# `previously_attempted_at` is non-null, and `next_attempt_at` is non-null), or if
|
|
711
|
+
# dunning has been exhausted (`previously_attempted_at` is non-null, but
|
|
712
|
+
# `next_attempt_at` is null).
|
|
713
713
|
sig { returns(T.nilable(Time)) }
|
|
714
714
|
attr_accessor :previously_attempted_at
|
|
715
715
|
|
|
@@ -733,9 +733,9 @@ module Orb
|
|
|
733
733
|
# If Orb has ever attempted payment auto-collection for this invoice, this field
|
|
734
734
|
# will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
|
|
735
735
|
# this can be used to tell whether the invoice is currently in dunning (that is,
|
|
736
|
-
# `previously_attempted_at` is non-null, and `
|
|
737
|
-
#
|
|
738
|
-
# `
|
|
736
|
+
# `previously_attempted_at` is non-null, and `next_attempt_at` is non-null), or if
|
|
737
|
+
# dunning has been exhausted (`previously_attempted_at` is non-null, but
|
|
738
|
+
# `next_attempt_at` is null).
|
|
739
739
|
previously_attempted_at:
|
|
740
740
|
)
|
|
741
741
|
end
|
|
@@ -142,6 +142,7 @@ module Orb
|
|
|
142
142
|
Orb::Price::TieredPackage::OrHash,
|
|
143
143
|
Orb::Price::TieredWithMinimum::OrHash,
|
|
144
144
|
Orb::Price::GroupedTiered::OrHash,
|
|
145
|
+
Orb::Price::GroupedTieredMatrix::OrHash,
|
|
145
146
|
Orb::Price::TieredPackageWithMinimum::OrHash,
|
|
146
147
|
Orb::Price::PackageWithAllocation::OrHash,
|
|
147
148
|
Orb::Price::UnitWithPercent::OrHash,
|
|
@@ -702,9 +702,9 @@ module Orb
|
|
|
702
702
|
# If Orb has ever attempted payment auto-collection for this invoice, this field
|
|
703
703
|
# will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
|
|
704
704
|
# this can be used to tell whether the invoice is currently in dunning (that is,
|
|
705
|
-
# `previously_attempted_at` is non-null, and `
|
|
706
|
-
#
|
|
707
|
-
# `
|
|
705
|
+
# `previously_attempted_at` is non-null, and `next_attempt_at` is non-null), or if
|
|
706
|
+
# dunning has been exhausted (`previously_attempted_at` is non-null, but
|
|
707
|
+
# `next_attempt_at` is null).
|
|
708
708
|
sig { returns(T.nilable(Time)) }
|
|
709
709
|
attr_accessor :previously_attempted_at
|
|
710
710
|
|
|
@@ -728,9 +728,9 @@ module Orb
|
|
|
728
728
|
# If Orb has ever attempted payment auto-collection for this invoice, this field
|
|
729
729
|
# will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
|
|
730
730
|
# this can be used to tell whether the invoice is currently in dunning (that is,
|
|
731
|
-
# `previously_attempted_at` is non-null, and `
|
|
732
|
-
#
|
|
733
|
-
# `
|
|
731
|
+
# `previously_attempted_at` is non-null, and `next_attempt_at` is non-null), or if
|
|
732
|
+
# dunning has been exhausted (`previously_attempted_at` is non-null, but
|
|
733
|
+
# `next_attempt_at` is null).
|
|
734
734
|
previously_attempted_at:
|
|
735
735
|
)
|
|
736
736
|
end
|
|
@@ -39,6 +39,7 @@ module Orb
|
|
|
39
39
|
Orb::Price::TieredPackage::OrHash,
|
|
40
40
|
Orb::Price::TieredWithMinimum::OrHash,
|
|
41
41
|
Orb::Price::GroupedTiered::OrHash,
|
|
42
|
+
Orb::Price::GroupedTieredMatrix::OrHash,
|
|
42
43
|
Orb::Price::TieredPackageWithMinimum::OrHash,
|
|
43
44
|
Orb::Price::PackageWithAllocation::OrHash,
|
|
44
45
|
Orb::Price::UnitWithPercent::OrHash,
|
data/rbi/orb/models/plan.rbi
CHANGED
|
@@ -175,6 +175,7 @@ module Orb
|
|
|
175
175
|
Orb::Price::TieredPackage::OrHash,
|
|
176
176
|
Orb::Price::TieredWithMinimum::OrHash,
|
|
177
177
|
Orb::Price::GroupedTiered::OrHash,
|
|
178
|
+
Orb::Price::GroupedTieredMatrix::OrHash,
|
|
178
179
|
Orb::Price::TieredPackageWithMinimum::OrHash,
|
|
179
180
|
Orb::Price::PackageWithAllocation::OrHash,
|
|
180
181
|
Orb::Price::UnitWithPercent::OrHash,
|
|
@@ -190,6 +190,7 @@ module Orb
|
|
|
190
190
|
Orb::NewPlanTieredPackagePrice,
|
|
191
191
|
Orb::NewPlanTieredWithMinimumPrice,
|
|
192
192
|
Orb::NewPlanGroupedTieredPrice,
|
|
193
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix,
|
|
193
194
|
Orb::NewPlanTieredPackageWithMinimumPrice,
|
|
194
195
|
Orb::NewPlanPackageWithAllocationPrice,
|
|
195
196
|
Orb::NewPlanUnitWithPercentPrice,
|
|
@@ -241,6 +242,7 @@ module Orb
|
|
|
241
242
|
Orb::NewPlanTieredPackagePrice::OrHash,
|
|
242
243
|
Orb::NewPlanTieredWithMinimumPrice::OrHash,
|
|
243
244
|
Orb::NewPlanGroupedTieredPrice::OrHash,
|
|
245
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::OrHash,
|
|
244
246
|
Orb::NewPlanTieredPackageWithMinimumPrice::OrHash,
|
|
245
247
|
Orb::NewPlanPackageWithAllocationPrice::OrHash,
|
|
246
248
|
Orb::NewPlanUnitWithPercentPrice::OrHash,
|
|
@@ -301,6 +303,7 @@ module Orb
|
|
|
301
303
|
Orb::NewPlanTieredPackagePrice,
|
|
302
304
|
Orb::NewPlanTieredWithMinimumPrice,
|
|
303
305
|
Orb::NewPlanGroupedTieredPrice,
|
|
306
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix,
|
|
304
307
|
Orb::NewPlanTieredPackageWithMinimumPrice,
|
|
305
308
|
Orb::NewPlanPackageWithAllocationPrice,
|
|
306
309
|
Orb::NewPlanUnitWithPercentPrice,
|
|
@@ -774,6 +777,7 @@ module Orb
|
|
|
774
777
|
Orb::NewPlanTieredPackagePrice,
|
|
775
778
|
Orb::NewPlanTieredWithMinimumPrice,
|
|
776
779
|
Orb::NewPlanGroupedTieredPrice,
|
|
780
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix,
|
|
777
781
|
Orb::NewPlanTieredPackageWithMinimumPrice,
|
|
778
782
|
Orb::NewPlanPackageWithAllocationPrice,
|
|
779
783
|
Orb::NewPlanUnitWithPercentPrice,
|
|
@@ -1273,6 +1277,445 @@ module Orb
|
|
|
1273
1277
|
end
|
|
1274
1278
|
end
|
|
1275
1279
|
|
|
1280
|
+
class GroupedTieredMatrix < Orb::Internal::Type::BaseModel
|
|
1281
|
+
OrHash =
|
|
1282
|
+
T.type_alias do
|
|
1283
|
+
T.any(
|
|
1284
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix,
|
|
1285
|
+
Orb::Internal::AnyHash
|
|
1286
|
+
)
|
|
1287
|
+
end
|
|
1288
|
+
|
|
1289
|
+
# The cadence to bill for this price on.
|
|
1290
|
+
sig do
|
|
1291
|
+
returns(
|
|
1292
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::Cadence::OrSymbol
|
|
1293
|
+
)
|
|
1294
|
+
end
|
|
1295
|
+
attr_accessor :cadence
|
|
1296
|
+
|
|
1297
|
+
# Configuration for grouped_tiered_matrix pricing
|
|
1298
|
+
sig do
|
|
1299
|
+
returns(
|
|
1300
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig
|
|
1301
|
+
)
|
|
1302
|
+
end
|
|
1303
|
+
attr_reader :grouped_tiered_matrix_config
|
|
1304
|
+
|
|
1305
|
+
sig do
|
|
1306
|
+
params(
|
|
1307
|
+
grouped_tiered_matrix_config:
|
|
1308
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::OrHash
|
|
1309
|
+
).void
|
|
1310
|
+
end
|
|
1311
|
+
attr_writer :grouped_tiered_matrix_config
|
|
1312
|
+
|
|
1313
|
+
# The id of the item the price will be associated with.
|
|
1314
|
+
sig { returns(String) }
|
|
1315
|
+
attr_accessor :item_id
|
|
1316
|
+
|
|
1317
|
+
# The pricing model type
|
|
1318
|
+
sig { returns(Symbol) }
|
|
1319
|
+
attr_accessor :model_type
|
|
1320
|
+
|
|
1321
|
+
# The name of the price.
|
|
1322
|
+
sig { returns(String) }
|
|
1323
|
+
attr_accessor :name
|
|
1324
|
+
|
|
1325
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1326
|
+
# usage-based.
|
|
1327
|
+
sig { returns(T.nilable(String)) }
|
|
1328
|
+
attr_accessor :billable_metric_id
|
|
1329
|
+
|
|
1330
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1331
|
+
# this is true, and in-arrears if this is false.
|
|
1332
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
1333
|
+
attr_accessor :billed_in_advance
|
|
1334
|
+
|
|
1335
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1336
|
+
# months.
|
|
1337
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1338
|
+
attr_reader :billing_cycle_configuration
|
|
1339
|
+
|
|
1340
|
+
sig do
|
|
1341
|
+
params(
|
|
1342
|
+
billing_cycle_configuration:
|
|
1343
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1344
|
+
).void
|
|
1345
|
+
end
|
|
1346
|
+
attr_writer :billing_cycle_configuration
|
|
1347
|
+
|
|
1348
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1349
|
+
sig { returns(T.nilable(Float)) }
|
|
1350
|
+
attr_accessor :conversion_rate
|
|
1351
|
+
|
|
1352
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1353
|
+
sig do
|
|
1354
|
+
returns(
|
|
1355
|
+
T.nilable(
|
|
1356
|
+
T.any(
|
|
1357
|
+
Orb::UnitConversionRateConfig,
|
|
1358
|
+
Orb::TieredConversionRateConfig
|
|
1359
|
+
)
|
|
1360
|
+
)
|
|
1361
|
+
)
|
|
1362
|
+
end
|
|
1363
|
+
attr_accessor :conversion_rate_config
|
|
1364
|
+
|
|
1365
|
+
# An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
1366
|
+
# price is billed.
|
|
1367
|
+
sig { returns(T.nilable(String)) }
|
|
1368
|
+
attr_accessor :currency
|
|
1369
|
+
|
|
1370
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1371
|
+
sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
|
|
1372
|
+
attr_reader :dimensional_price_configuration
|
|
1373
|
+
|
|
1374
|
+
sig do
|
|
1375
|
+
params(
|
|
1376
|
+
dimensional_price_configuration:
|
|
1377
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
|
|
1378
|
+
).void
|
|
1379
|
+
end
|
|
1380
|
+
attr_writer :dimensional_price_configuration
|
|
1381
|
+
|
|
1382
|
+
# An alias for the price.
|
|
1383
|
+
sig { returns(T.nilable(String)) }
|
|
1384
|
+
attr_accessor :external_price_id
|
|
1385
|
+
|
|
1386
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1387
|
+
# applied.
|
|
1388
|
+
sig { returns(T.nilable(Float)) }
|
|
1389
|
+
attr_accessor :fixed_price_quantity
|
|
1390
|
+
|
|
1391
|
+
# The property used to group this price on an invoice
|
|
1392
|
+
sig { returns(T.nilable(String)) }
|
|
1393
|
+
attr_accessor :invoice_grouping_key
|
|
1394
|
+
|
|
1395
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1396
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1397
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1398
|
+
attr_reader :invoicing_cycle_configuration
|
|
1399
|
+
|
|
1400
|
+
sig do
|
|
1401
|
+
params(
|
|
1402
|
+
invoicing_cycle_configuration:
|
|
1403
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1404
|
+
).void
|
|
1405
|
+
end
|
|
1406
|
+
attr_writer :invoicing_cycle_configuration
|
|
1407
|
+
|
|
1408
|
+
# The ID of the license type to associate with this price.
|
|
1409
|
+
sig { returns(T.nilable(String)) }
|
|
1410
|
+
attr_accessor :license_type_id
|
|
1411
|
+
|
|
1412
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1413
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1414
|
+
# by setting `metadata` to `null`.
|
|
1415
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
1416
|
+
attr_accessor :metadata
|
|
1417
|
+
|
|
1418
|
+
# A transient ID that can be used to reference this price when adding adjustments
|
|
1419
|
+
# in the same API call.
|
|
1420
|
+
sig { returns(T.nilable(String)) }
|
|
1421
|
+
attr_accessor :reference_id
|
|
1422
|
+
|
|
1423
|
+
sig do
|
|
1424
|
+
params(
|
|
1425
|
+
cadence:
|
|
1426
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::Cadence::OrSymbol,
|
|
1427
|
+
grouped_tiered_matrix_config:
|
|
1428
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::OrHash,
|
|
1429
|
+
item_id: String,
|
|
1430
|
+
name: String,
|
|
1431
|
+
billable_metric_id: T.nilable(String),
|
|
1432
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1433
|
+
billing_cycle_configuration:
|
|
1434
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1435
|
+
conversion_rate: T.nilable(Float),
|
|
1436
|
+
conversion_rate_config:
|
|
1437
|
+
T.nilable(
|
|
1438
|
+
T.any(
|
|
1439
|
+
Orb::UnitConversionRateConfig::OrHash,
|
|
1440
|
+
Orb::TieredConversionRateConfig::OrHash
|
|
1441
|
+
)
|
|
1442
|
+
),
|
|
1443
|
+
currency: T.nilable(String),
|
|
1444
|
+
dimensional_price_configuration:
|
|
1445
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
|
|
1446
|
+
external_price_id: T.nilable(String),
|
|
1447
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1448
|
+
invoice_grouping_key: T.nilable(String),
|
|
1449
|
+
invoicing_cycle_configuration:
|
|
1450
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1451
|
+
license_type_id: T.nilable(String),
|
|
1452
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
1453
|
+
reference_id: T.nilable(String),
|
|
1454
|
+
model_type: Symbol
|
|
1455
|
+
).returns(T.attached_class)
|
|
1456
|
+
end
|
|
1457
|
+
def self.new(
|
|
1458
|
+
# The cadence to bill for this price on.
|
|
1459
|
+
cadence:,
|
|
1460
|
+
# Configuration for grouped_tiered_matrix pricing
|
|
1461
|
+
grouped_tiered_matrix_config:,
|
|
1462
|
+
# The id of the item the price will be associated with.
|
|
1463
|
+
item_id:,
|
|
1464
|
+
# The name of the price.
|
|
1465
|
+
name:,
|
|
1466
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1467
|
+
# usage-based.
|
|
1468
|
+
billable_metric_id: nil,
|
|
1469
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1470
|
+
# this is true, and in-arrears if this is false.
|
|
1471
|
+
billed_in_advance: nil,
|
|
1472
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1473
|
+
# months.
|
|
1474
|
+
billing_cycle_configuration: nil,
|
|
1475
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1476
|
+
conversion_rate: nil,
|
|
1477
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1478
|
+
conversion_rate_config: nil,
|
|
1479
|
+
# An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
1480
|
+
# price is billed.
|
|
1481
|
+
currency: nil,
|
|
1482
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1483
|
+
dimensional_price_configuration: nil,
|
|
1484
|
+
# An alias for the price.
|
|
1485
|
+
external_price_id: nil,
|
|
1486
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1487
|
+
# applied.
|
|
1488
|
+
fixed_price_quantity: nil,
|
|
1489
|
+
# The property used to group this price on an invoice
|
|
1490
|
+
invoice_grouping_key: nil,
|
|
1491
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1492
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1493
|
+
invoicing_cycle_configuration: nil,
|
|
1494
|
+
# The ID of the license type to associate with this price.
|
|
1495
|
+
license_type_id: nil,
|
|
1496
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1497
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1498
|
+
# by setting `metadata` to `null`.
|
|
1499
|
+
metadata: nil,
|
|
1500
|
+
# A transient ID that can be used to reference this price when adding adjustments
|
|
1501
|
+
# in the same API call.
|
|
1502
|
+
reference_id: nil,
|
|
1503
|
+
# The pricing model type
|
|
1504
|
+
model_type: :grouped_tiered_matrix
|
|
1505
|
+
)
|
|
1506
|
+
end
|
|
1507
|
+
|
|
1508
|
+
sig do
|
|
1509
|
+
override.returns(
|
|
1510
|
+
{
|
|
1511
|
+
cadence:
|
|
1512
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::Cadence::OrSymbol,
|
|
1513
|
+
grouped_tiered_matrix_config:
|
|
1514
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig,
|
|
1515
|
+
item_id: String,
|
|
1516
|
+
model_type: Symbol,
|
|
1517
|
+
name: String,
|
|
1518
|
+
billable_metric_id: T.nilable(String),
|
|
1519
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1520
|
+
billing_cycle_configuration:
|
|
1521
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1522
|
+
conversion_rate: T.nilable(Float),
|
|
1523
|
+
conversion_rate_config:
|
|
1524
|
+
T.nilable(
|
|
1525
|
+
T.any(
|
|
1526
|
+
Orb::UnitConversionRateConfig,
|
|
1527
|
+
Orb::TieredConversionRateConfig
|
|
1528
|
+
)
|
|
1529
|
+
),
|
|
1530
|
+
currency: T.nilable(String),
|
|
1531
|
+
dimensional_price_configuration:
|
|
1532
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration),
|
|
1533
|
+
external_price_id: T.nilable(String),
|
|
1534
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1535
|
+
invoice_grouping_key: T.nilable(String),
|
|
1536
|
+
invoicing_cycle_configuration:
|
|
1537
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1538
|
+
license_type_id: T.nilable(String),
|
|
1539
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
1540
|
+
reference_id: T.nilable(String)
|
|
1541
|
+
}
|
|
1542
|
+
)
|
|
1543
|
+
end
|
|
1544
|
+
def to_hash
|
|
1545
|
+
end
|
|
1546
|
+
|
|
1547
|
+
# The cadence to bill for this price on.
|
|
1548
|
+
module Cadence
|
|
1549
|
+
extend Orb::Internal::Type::Enum
|
|
1550
|
+
|
|
1551
|
+
TaggedSymbol =
|
|
1552
|
+
T.type_alias do
|
|
1553
|
+
T.all(
|
|
1554
|
+
Symbol,
|
|
1555
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::Cadence
|
|
1556
|
+
)
|
|
1557
|
+
end
|
|
1558
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1559
|
+
|
|
1560
|
+
ANNUAL =
|
|
1561
|
+
T.let(
|
|
1562
|
+
:annual,
|
|
1563
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::Cadence::TaggedSymbol
|
|
1564
|
+
)
|
|
1565
|
+
SEMI_ANNUAL =
|
|
1566
|
+
T.let(
|
|
1567
|
+
:semi_annual,
|
|
1568
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::Cadence::TaggedSymbol
|
|
1569
|
+
)
|
|
1570
|
+
MONTHLY =
|
|
1571
|
+
T.let(
|
|
1572
|
+
:monthly,
|
|
1573
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::Cadence::TaggedSymbol
|
|
1574
|
+
)
|
|
1575
|
+
QUARTERLY =
|
|
1576
|
+
T.let(
|
|
1577
|
+
:quarterly,
|
|
1578
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::Cadence::TaggedSymbol
|
|
1579
|
+
)
|
|
1580
|
+
ONE_TIME =
|
|
1581
|
+
T.let(
|
|
1582
|
+
:one_time,
|
|
1583
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::Cadence::TaggedSymbol
|
|
1584
|
+
)
|
|
1585
|
+
CUSTOM =
|
|
1586
|
+
T.let(
|
|
1587
|
+
:custom,
|
|
1588
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::Cadence::TaggedSymbol
|
|
1589
|
+
)
|
|
1590
|
+
|
|
1591
|
+
sig do
|
|
1592
|
+
override.returns(
|
|
1593
|
+
T::Array[
|
|
1594
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::Cadence::TaggedSymbol
|
|
1595
|
+
]
|
|
1596
|
+
)
|
|
1597
|
+
end
|
|
1598
|
+
def self.values
|
|
1599
|
+
end
|
|
1600
|
+
end
|
|
1601
|
+
|
|
1602
|
+
class GroupedTieredMatrixConfig < Orb::Internal::Type::BaseModel
|
|
1603
|
+
OrHash =
|
|
1604
|
+
T.type_alias do
|
|
1605
|
+
T.any(
|
|
1606
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig,
|
|
1607
|
+
Orb::Internal::AnyHash
|
|
1608
|
+
)
|
|
1609
|
+
end
|
|
1610
|
+
|
|
1611
|
+
# Per unit rate for usage whose dimension value has no configured tiers
|
|
1612
|
+
sig { returns(String) }
|
|
1613
|
+
attr_accessor :default_unit_amount
|
|
1614
|
+
|
|
1615
|
+
# The billable metric property used to group usage before tiering
|
|
1616
|
+
sig { returns(String) }
|
|
1617
|
+
attr_accessor :dimension
|
|
1618
|
+
|
|
1619
|
+
# Graduated tiers keyed by dimension value; usage for a value is tiered only
|
|
1620
|
+
# against its own rows
|
|
1621
|
+
sig do
|
|
1622
|
+
returns(
|
|
1623
|
+
T::Array[
|
|
1624
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier
|
|
1625
|
+
]
|
|
1626
|
+
)
|
|
1627
|
+
end
|
|
1628
|
+
attr_accessor :tiers
|
|
1629
|
+
|
|
1630
|
+
# Configuration for grouped_tiered_matrix pricing
|
|
1631
|
+
sig do
|
|
1632
|
+
params(
|
|
1633
|
+
default_unit_amount: String,
|
|
1634
|
+
dimension: String,
|
|
1635
|
+
tiers:
|
|
1636
|
+
T::Array[
|
|
1637
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier::OrHash
|
|
1638
|
+
]
|
|
1639
|
+
).returns(T.attached_class)
|
|
1640
|
+
end
|
|
1641
|
+
def self.new(
|
|
1642
|
+
# Per unit rate for usage whose dimension value has no configured tiers
|
|
1643
|
+
default_unit_amount:,
|
|
1644
|
+
# The billable metric property used to group usage before tiering
|
|
1645
|
+
dimension:,
|
|
1646
|
+
# Graduated tiers keyed by dimension value; usage for a value is tiered only
|
|
1647
|
+
# against its own rows
|
|
1648
|
+
tiers:
|
|
1649
|
+
)
|
|
1650
|
+
end
|
|
1651
|
+
|
|
1652
|
+
sig do
|
|
1653
|
+
override.returns(
|
|
1654
|
+
{
|
|
1655
|
+
default_unit_amount: String,
|
|
1656
|
+
dimension: String,
|
|
1657
|
+
tiers:
|
|
1658
|
+
T::Array[
|
|
1659
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier
|
|
1660
|
+
]
|
|
1661
|
+
}
|
|
1662
|
+
)
|
|
1663
|
+
end
|
|
1664
|
+
def to_hash
|
|
1665
|
+
end
|
|
1666
|
+
|
|
1667
|
+
class Tier < Orb::Internal::Type::BaseModel
|
|
1668
|
+
OrHash =
|
|
1669
|
+
T.type_alias do
|
|
1670
|
+
T.any(
|
|
1671
|
+
Orb::PlanCreateParams::Price::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier,
|
|
1672
|
+
Orb::Internal::AnyHash
|
|
1673
|
+
)
|
|
1674
|
+
end
|
|
1675
|
+
|
|
1676
|
+
# The dimension value this tier applies to
|
|
1677
|
+
sig { returns(String) }
|
|
1678
|
+
attr_accessor :dimension_value
|
|
1679
|
+
|
|
1680
|
+
sig { returns(String) }
|
|
1681
|
+
attr_accessor :tier_lower_bound
|
|
1682
|
+
|
|
1683
|
+
# Per unit amount
|
|
1684
|
+
sig { returns(String) }
|
|
1685
|
+
attr_accessor :unit_amount
|
|
1686
|
+
|
|
1687
|
+
# Configuration for a single tier scoped to a dimension value
|
|
1688
|
+
sig do
|
|
1689
|
+
params(
|
|
1690
|
+
dimension_value: String,
|
|
1691
|
+
tier_lower_bound: String,
|
|
1692
|
+
unit_amount: String
|
|
1693
|
+
).returns(T.attached_class)
|
|
1694
|
+
end
|
|
1695
|
+
def self.new(
|
|
1696
|
+
# The dimension value this tier applies to
|
|
1697
|
+
dimension_value:,
|
|
1698
|
+
tier_lower_bound:,
|
|
1699
|
+
# Per unit amount
|
|
1700
|
+
unit_amount:
|
|
1701
|
+
)
|
|
1702
|
+
end
|
|
1703
|
+
|
|
1704
|
+
sig do
|
|
1705
|
+
override.returns(
|
|
1706
|
+
{
|
|
1707
|
+
dimension_value: String,
|
|
1708
|
+
tier_lower_bound: String,
|
|
1709
|
+
unit_amount: String
|
|
1710
|
+
}
|
|
1711
|
+
)
|
|
1712
|
+
end
|
|
1713
|
+
def to_hash
|
|
1714
|
+
end
|
|
1715
|
+
end
|
|
1716
|
+
end
|
|
1717
|
+
end
|
|
1718
|
+
|
|
1276
1719
|
class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel
|
|
1277
1720
|
OrHash =
|
|
1278
1721
|
T.type_alias do
|
|
@@ -54,6 +54,7 @@ module Orb
|
|
|
54
54
|
Orb::Price::TieredPackage::OrHash,
|
|
55
55
|
Orb::Price::TieredWithMinimum::OrHash,
|
|
56
56
|
Orb::Price::GroupedTiered::OrHash,
|
|
57
|
+
Orb::Price::GroupedTieredMatrix::OrHash,
|
|
57
58
|
Orb::Price::TieredPackageWithMinimum::OrHash,
|
|
58
59
|
Orb::Price::PackageWithAllocation::OrHash,
|
|
59
60
|
Orb::Price::UnitWithPercent::OrHash,
|