orb-billing 1.24.0 → 1.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -1
  4. data/lib/orb/models/alert.rb +4 -2
  5. data/lib/orb/models/alert_update_params.rb +5 -3
  6. data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +530 -6
  7. data/lib/orb/models/beta_create_plan_version_params.rb +526 -6
  8. data/lib/orb/models/changed_subscription_resources.rb +5 -5
  9. data/lib/orb/models/invoice.rb +5 -5
  10. data/lib/orb/models/invoice_fetch_upcoming_response.rb +5 -5
  11. data/lib/orb/models/invoice_issue_summary_response.rb +3 -3
  12. data/lib/orb/models/invoice_line_item_create_response.rb +2 -2
  13. data/lib/orb/models/invoice_list_summary_response.rb +3 -3
  14. data/lib/orb/models/per_price_cost.rb +2 -2
  15. data/lib/orb/models/plan.rb +2 -2
  16. data/lib/orb/models/plan_create_params.rb +259 -3
  17. data/lib/orb/models/plan_version.rb +2 -2
  18. data/lib/orb/models/price.rb +433 -1
  19. data/lib/orb/models/price_create_params.rb +244 -3
  20. data/lib/orb/models/price_evaluate_multiple_params.rb +255 -3
  21. data/lib/orb/models/price_evaluate_preview_events_params.rb +255 -3
  22. data/lib/orb/models/price_interval.rb +2 -2
  23. data/lib/orb/models/subscription_create_params.rb +521 -6
  24. data/lib/orb/models/subscription_price_intervals_params.rb +251 -3
  25. data/lib/orb/models/subscription_schedule_plan_change_params.rb +530 -6
  26. data/lib/orb/resources/alerts.rb +5 -2
  27. data/lib/orb/resources/customers/costs.rb +20 -0
  28. data/lib/orb/resources/licenses/external_licenses.rb +7 -0
  29. data/lib/orb/resources/licenses/usage.rb +3 -0
  30. data/lib/orb/resources/prices/external_price_id.rb +2 -2
  31. data/lib/orb/resources/prices.rb +5 -5
  32. data/lib/orb/resources/subscriptions.rb +39 -6
  33. data/lib/orb/version.rb +1 -1
  34. data/rbi/orb/models/alert.rbi +6 -2
  35. data/rbi/orb/models/alert_update_params.rbi +8 -4
  36. data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +2789 -1903
  37. data/rbi/orb/models/beta_create_plan_version_params.rbi +2788 -1902
  38. data/rbi/orb/models/changed_subscription_resources.rbi +7 -6
  39. data/rbi/orb/models/invoice.rbi +7 -6
  40. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +7 -6
  41. data/rbi/orb/models/invoice_issue_summary_response.rbi +6 -6
  42. data/rbi/orb/models/invoice_line_item_create_response.rbi +1 -0
  43. data/rbi/orb/models/invoice_list_summary_response.rbi +6 -6
  44. data/rbi/orb/models/per_price_cost.rbi +1 -0
  45. data/rbi/orb/models/plan.rbi +1 -0
  46. data/rbi/orb/models/plan_create_params.rbi +443 -0
  47. data/rbi/orb/models/plan_version.rbi +1 -0
  48. data/rbi/orb/models/price.rbi +766 -0
  49. data/rbi/orb/models/price_create_params.rbi +431 -0
  50. data/rbi/orb/models/price_evaluate_multiple_params.rbi +431 -0
  51. data/rbi/orb/models/price_evaluate_preview_events_params.rbi +431 -0
  52. data/rbi/orb/models/price_interval.rbi +1 -0
  53. data/rbi/orb/models/subscription_create_params.rbi +2489 -1603
  54. data/rbi/orb/models/subscription_price_intervals_params.rbi +431 -0
  55. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +2483 -1597
  56. data/rbi/orb/resources/alerts.rbi +8 -3
  57. data/rbi/orb/resources/customers/costs.rbi +20 -0
  58. data/rbi/orb/resources/licenses/external_licenses.rbi +7 -0
  59. data/rbi/orb/resources/licenses/usage.rbi +3 -0
  60. data/rbi/orb/resources/prices.rbi +1 -0
  61. data/rbi/orb/resources/subscriptions.rbi +39 -6
  62. data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +366 -0
  63. data/sig/orb/models/beta_create_plan_version_params.rbs +366 -0
  64. data/sig/orb/models/plan_create_params.rbs +183 -0
  65. data/sig/orb/models/price.rbs +327 -0
  66. data/sig/orb/models/price_create_params.rbs +173 -0
  67. data/sig/orb/models/price_evaluate_multiple_params.rbs +178 -0
  68. data/sig/orb/models/price_evaluate_preview_events_params.rbs +178 -0
  69. data/sig/orb/models/subscription_create_params.rbs +366 -0
  70. data/sig/orb/models/subscription_price_intervals_params.rbs +178 -0
  71. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +366 -0
  72. metadata +2 -2
@@ -667,7 +667,7 @@ module Orb
667
667
  # @!attribute price
668
668
  # New subscription price request body params.
669
669
  #
670
- # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput, nil]
670
+ # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedTieredMatrix, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput, nil]
671
671
  optional :price, union: -> { Orb::SubscriptionCreateParams::AddPrice::Price }, nil?: true
672
672
 
673
673
  # @!attribute price_id
@@ -704,7 +704,7 @@ module Orb
704
704
  #
705
705
  # @param plan_phase_order [Integer, nil] The phase to add this price to.
706
706
  #
707
- # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput, nil] New subscription price request body params.
707
+ # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedTieredMatrix, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput, nil] New subscription price request body params.
708
708
  #
709
709
  # @param price_id [String, nil] The id of the price to add to the subscription.
710
710
  #
@@ -738,6 +738,8 @@ module Orb
738
738
 
739
739
  variant :grouped_tiered, -> { Orb::NewSubscriptionGroupedTieredPrice }
740
740
 
741
+ variant :grouped_tiered_matrix, -> { Orb::SubscriptionCreateParams::AddPrice::Price::GroupedTieredMatrix }
742
+
741
743
  variant :tiered_package_with_minimum, -> { Orb::NewSubscriptionTieredPackageWithMinimumPrice }
742
744
 
743
745
  variant :package_with_allocation, -> { Orb::NewSubscriptionPackageWithAllocationPrice }
@@ -1047,6 +1049,261 @@ module Orb
1047
1049
  end
1048
1050
  end
1049
1051
 
1052
+ class GroupedTieredMatrix < Orb::Internal::Type::BaseModel
1053
+ # @!attribute cadence
1054
+ # The cadence to bill for this price on.
1055
+ #
1056
+ # @return [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedTieredMatrix::Cadence]
1057
+ required :cadence,
1058
+ enum: -> { Orb::SubscriptionCreateParams::AddPrice::Price::GroupedTieredMatrix::Cadence }
1059
+
1060
+ # @!attribute grouped_tiered_matrix_config
1061
+ # Configuration for grouped_tiered_matrix pricing
1062
+ #
1063
+ # @return [Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig]
1064
+ required :grouped_tiered_matrix_config,
1065
+ -> { Orb::SubscriptionCreateParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig }
1066
+
1067
+ # @!attribute item_id
1068
+ # The id of the item the price will be associated with.
1069
+ #
1070
+ # @return [String]
1071
+ required :item_id, String
1072
+
1073
+ # @!attribute model_type
1074
+ # The pricing model type
1075
+ #
1076
+ # @return [Symbol, :grouped_tiered_matrix]
1077
+ required :model_type, const: :grouped_tiered_matrix
1078
+
1079
+ # @!attribute name
1080
+ # The name of the price.
1081
+ #
1082
+ # @return [String]
1083
+ required :name, String
1084
+
1085
+ # @!attribute billable_metric_id
1086
+ # The id of the billable metric for the price. Only needed if the price is
1087
+ # usage-based.
1088
+ #
1089
+ # @return [String, nil]
1090
+ optional :billable_metric_id, String, nil?: true
1091
+
1092
+ # @!attribute billed_in_advance
1093
+ # If the Price represents a fixed cost, the price will be billed in-advance if
1094
+ # this is true, and in-arrears if this is false.
1095
+ #
1096
+ # @return [Boolean, nil]
1097
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
1098
+
1099
+ # @!attribute billing_cycle_configuration
1100
+ # For custom cadence: specifies the duration of the billing period in days or
1101
+ # months.
1102
+ #
1103
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
1104
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1105
+
1106
+ # @!attribute conversion_rate
1107
+ # The per unit conversion rate of the price currency to the invoicing currency.
1108
+ #
1109
+ # @return [Float, nil]
1110
+ optional :conversion_rate, Float, nil?: true
1111
+
1112
+ # @!attribute conversion_rate_config
1113
+ # The configuration for the rate of the price currency to the invoicing currency.
1114
+ #
1115
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
1116
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
1117
+
1118
+ # @!attribute currency
1119
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
1120
+ # price is billed.
1121
+ #
1122
+ # @return [String, nil]
1123
+ optional :currency, String, nil?: true
1124
+
1125
+ # @!attribute dimensional_price_configuration
1126
+ # For dimensional price: specifies a price group and dimension values
1127
+ #
1128
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
1129
+ optional :dimensional_price_configuration,
1130
+ -> {
1131
+ Orb::NewDimensionalPriceConfiguration
1132
+ },
1133
+ nil?: true
1134
+
1135
+ # @!attribute external_price_id
1136
+ # An alias for the price.
1137
+ #
1138
+ # @return [String, nil]
1139
+ optional :external_price_id, String, nil?: true
1140
+
1141
+ # @!attribute fixed_price_quantity
1142
+ # If the Price represents a fixed cost, this represents the quantity of units
1143
+ # applied.
1144
+ #
1145
+ # @return [Float, nil]
1146
+ optional :fixed_price_quantity, Float, nil?: true
1147
+
1148
+ # @!attribute invoice_grouping_key
1149
+ # The property used to group this price on an invoice
1150
+ #
1151
+ # @return [String, nil]
1152
+ optional :invoice_grouping_key, String, nil?: true
1153
+
1154
+ # @!attribute invoicing_cycle_configuration
1155
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
1156
+ # If unspecified, a single invoice is produced per billing cycle.
1157
+ #
1158
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
1159
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1160
+
1161
+ # @!attribute license_type_id
1162
+ # The ID of the license type to associate with this price.
1163
+ #
1164
+ # @return [String, nil]
1165
+ optional :license_type_id, String, nil?: true
1166
+
1167
+ # @!attribute metadata
1168
+ # User-specified key/value pairs for the resource. Individual keys can be removed
1169
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
1170
+ # by setting `metadata` to `null`.
1171
+ #
1172
+ # @return [Hash{Symbol=>String, nil}, nil]
1173
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
1174
+
1175
+ # @!attribute reference_id
1176
+ # A transient ID that can be used to reference this price when adding adjustments
1177
+ # in the same API call.
1178
+ #
1179
+ # @return [String, nil]
1180
+ optional :reference_id, String, nil?: true
1181
+
1182
+ # @!method initialize(cadence:, grouped_tiered_matrix_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_tiered_matrix)
1183
+ # Some parameter documentations has been truncated, see
1184
+ # {Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedTieredMatrix}
1185
+ # for more details.
1186
+ #
1187
+ # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedTieredMatrix::Cadence] The cadence to bill for this price on.
1188
+ #
1189
+ # @param grouped_tiered_matrix_config [Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig] Configuration for grouped_tiered_matrix pricing
1190
+ #
1191
+ # @param item_id [String] The id of the item the price will be associated with.
1192
+ #
1193
+ # @param name [String] The name of the price.
1194
+ #
1195
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
1196
+ #
1197
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
1198
+ #
1199
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
1200
+ #
1201
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
1202
+ #
1203
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
1204
+ #
1205
+ # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr
1206
+ #
1207
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
1208
+ #
1209
+ # @param external_price_id [String, nil] An alias for the price.
1210
+ #
1211
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
1212
+ #
1213
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
1214
+ #
1215
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
1216
+ #
1217
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
1218
+ #
1219
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
1220
+ #
1221
+ # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
1222
+ #
1223
+ # @param model_type [Symbol, :grouped_tiered_matrix] The pricing model type
1224
+
1225
+ # The cadence to bill for this price on.
1226
+ #
1227
+ # @see Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedTieredMatrix#cadence
1228
+ module Cadence
1229
+ extend Orb::Internal::Type::Enum
1230
+
1231
+ ANNUAL = :annual
1232
+ SEMI_ANNUAL = :semi_annual
1233
+ MONTHLY = :monthly
1234
+ QUARTERLY = :quarterly
1235
+ ONE_TIME = :one_time
1236
+ CUSTOM = :custom
1237
+
1238
+ # @!method self.values
1239
+ # @return [Array<Symbol>]
1240
+ end
1241
+
1242
+ # @see Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedTieredMatrix#grouped_tiered_matrix_config
1243
+ class GroupedTieredMatrixConfig < Orb::Internal::Type::BaseModel
1244
+ # @!attribute default_unit_amount
1245
+ # Per unit rate for usage whose dimension value has no configured tiers
1246
+ #
1247
+ # @return [String]
1248
+ required :default_unit_amount, String
1249
+
1250
+ # @!attribute dimension
1251
+ # The billable metric property used to group usage before tiering
1252
+ #
1253
+ # @return [String]
1254
+ required :dimension, String
1255
+
1256
+ # @!attribute tiers
1257
+ # Graduated tiers keyed by dimension value; usage for a value is tiered only
1258
+ # against its own rows
1259
+ #
1260
+ # @return [Array<Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier>]
1261
+ required :tiers,
1262
+ -> { Orb::Internal::Type::ArrayOf[Orb::SubscriptionCreateParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier] }
1263
+
1264
+ # @!method initialize(default_unit_amount:, dimension:, tiers:)
1265
+ # Some parameter documentations has been truncated, see
1266
+ # {Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig}
1267
+ # for more details.
1268
+ #
1269
+ # Configuration for grouped_tiered_matrix pricing
1270
+ #
1271
+ # @param default_unit_amount [String] Per unit rate for usage whose dimension value has no configured tiers
1272
+ #
1273
+ # @param dimension [String] The billable metric property used to group usage before tiering
1274
+ #
1275
+ # @param tiers [Array<Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier>] Graduated tiers keyed by dimension value; usage for a value is tiered only again
1276
+
1277
+ class Tier < Orb::Internal::Type::BaseModel
1278
+ # @!attribute dimension_value
1279
+ # The dimension value this tier applies to
1280
+ #
1281
+ # @return [String]
1282
+ required :dimension_value, String
1283
+
1284
+ # @!attribute tier_lower_bound
1285
+ #
1286
+ # @return [String]
1287
+ required :tier_lower_bound, String
1288
+
1289
+ # @!attribute unit_amount
1290
+ # Per unit amount
1291
+ #
1292
+ # @return [String]
1293
+ required :unit_amount, String
1294
+
1295
+ # @!method initialize(dimension_value:, tier_lower_bound:, unit_amount:)
1296
+ # Configuration for a single tier scoped to a dimension value
1297
+ #
1298
+ # @param dimension_value [String] The dimension value this tier applies to
1299
+ #
1300
+ # @param tier_lower_bound [String]
1301
+ #
1302
+ # @param unit_amount [String] Per unit amount
1303
+ end
1304
+ end
1305
+ end
1306
+
1050
1307
  class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel
1051
1308
  # @!attribute cadence
1052
1309
  # The cadence to bill for this price on.
@@ -3043,7 +3300,7 @@ module Orb
3043
3300
  end
3044
3301
 
3045
3302
  # @!method self.variants
3046
- # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput)]
3303
+ # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedTieredMatrix, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput)]
3047
3304
  end
3048
3305
  end
3049
3306
 
@@ -3401,7 +3658,7 @@ module Orb
3401
3658
  # @!attribute price
3402
3659
  # New subscription price request body params.
3403
3660
  #
3404
- # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput, nil]
3661
+ # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedTieredMatrix, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput, nil]
3405
3662
  optional :price, union: -> { Orb::SubscriptionCreateParams::ReplacePrice::Price }, nil?: true
3406
3663
 
3407
3664
  # @!attribute price_id
@@ -3430,7 +3687,7 @@ module Orb
3430
3687
  #
3431
3688
  # @param minimum_amount [String, nil] [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for
3432
3689
  #
3433
- # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput, nil] New subscription price request body params.
3690
+ # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedTieredMatrix, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput, nil] New subscription price request body params.
3434
3691
  #
3435
3692
  # @param price_id [String, nil] The id of the price to add to the subscription.
3436
3693
 
@@ -3462,6 +3719,9 @@ module Orb
3462
3719
 
3463
3720
  variant :grouped_tiered, -> { Orb::NewSubscriptionGroupedTieredPrice }
3464
3721
 
3722
+ variant :grouped_tiered_matrix,
3723
+ -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedTieredMatrix }
3724
+
3465
3725
  variant :tiered_package_with_minimum, -> { Orb::NewSubscriptionTieredPackageWithMinimumPrice }
3466
3726
 
3467
3727
  variant :package_with_allocation, -> { Orb::NewSubscriptionPackageWithAllocationPrice }
@@ -3773,6 +4033,261 @@ module Orb
3773
4033
  end
3774
4034
  end
3775
4035
 
4036
+ class GroupedTieredMatrix < Orb::Internal::Type::BaseModel
4037
+ # @!attribute cadence
4038
+ # The cadence to bill for this price on.
4039
+ #
4040
+ # @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedTieredMatrix::Cadence]
4041
+ required :cadence,
4042
+ enum: -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedTieredMatrix::Cadence }
4043
+
4044
+ # @!attribute grouped_tiered_matrix_config
4045
+ # Configuration for grouped_tiered_matrix pricing
4046
+ #
4047
+ # @return [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig]
4048
+ required :grouped_tiered_matrix_config,
4049
+ -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig }
4050
+
4051
+ # @!attribute item_id
4052
+ # The id of the item the price will be associated with.
4053
+ #
4054
+ # @return [String]
4055
+ required :item_id, String
4056
+
4057
+ # @!attribute model_type
4058
+ # The pricing model type
4059
+ #
4060
+ # @return [Symbol, :grouped_tiered_matrix]
4061
+ required :model_type, const: :grouped_tiered_matrix
4062
+
4063
+ # @!attribute name
4064
+ # The name of the price.
4065
+ #
4066
+ # @return [String]
4067
+ required :name, String
4068
+
4069
+ # @!attribute billable_metric_id
4070
+ # The id of the billable metric for the price. Only needed if the price is
4071
+ # usage-based.
4072
+ #
4073
+ # @return [String, nil]
4074
+ optional :billable_metric_id, String, nil?: true
4075
+
4076
+ # @!attribute billed_in_advance
4077
+ # If the Price represents a fixed cost, the price will be billed in-advance if
4078
+ # this is true, and in-arrears if this is false.
4079
+ #
4080
+ # @return [Boolean, nil]
4081
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
4082
+
4083
+ # @!attribute billing_cycle_configuration
4084
+ # For custom cadence: specifies the duration of the billing period in days or
4085
+ # months.
4086
+ #
4087
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
4088
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
4089
+
4090
+ # @!attribute conversion_rate
4091
+ # The per unit conversion rate of the price currency to the invoicing currency.
4092
+ #
4093
+ # @return [Float, nil]
4094
+ optional :conversion_rate, Float, nil?: true
4095
+
4096
+ # @!attribute conversion_rate_config
4097
+ # The configuration for the rate of the price currency to the invoicing currency.
4098
+ #
4099
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
4100
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
4101
+
4102
+ # @!attribute currency
4103
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
4104
+ # price is billed.
4105
+ #
4106
+ # @return [String, nil]
4107
+ optional :currency, String, nil?: true
4108
+
4109
+ # @!attribute dimensional_price_configuration
4110
+ # For dimensional price: specifies a price group and dimension values
4111
+ #
4112
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
4113
+ optional :dimensional_price_configuration,
4114
+ -> {
4115
+ Orb::NewDimensionalPriceConfiguration
4116
+ },
4117
+ nil?: true
4118
+
4119
+ # @!attribute external_price_id
4120
+ # An alias for the price.
4121
+ #
4122
+ # @return [String, nil]
4123
+ optional :external_price_id, String, nil?: true
4124
+
4125
+ # @!attribute fixed_price_quantity
4126
+ # If the Price represents a fixed cost, this represents the quantity of units
4127
+ # applied.
4128
+ #
4129
+ # @return [Float, nil]
4130
+ optional :fixed_price_quantity, Float, nil?: true
4131
+
4132
+ # @!attribute invoice_grouping_key
4133
+ # The property used to group this price on an invoice
4134
+ #
4135
+ # @return [String, nil]
4136
+ optional :invoice_grouping_key, String, nil?: true
4137
+
4138
+ # @!attribute invoicing_cycle_configuration
4139
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
4140
+ # If unspecified, a single invoice is produced per billing cycle.
4141
+ #
4142
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
4143
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
4144
+
4145
+ # @!attribute license_type_id
4146
+ # The ID of the license type to associate with this price.
4147
+ #
4148
+ # @return [String, nil]
4149
+ optional :license_type_id, String, nil?: true
4150
+
4151
+ # @!attribute metadata
4152
+ # User-specified key/value pairs for the resource. Individual keys can be removed
4153
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
4154
+ # by setting `metadata` to `null`.
4155
+ #
4156
+ # @return [Hash{Symbol=>String, nil}, nil]
4157
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
4158
+
4159
+ # @!attribute reference_id
4160
+ # A transient ID that can be used to reference this price when adding adjustments
4161
+ # in the same API call.
4162
+ #
4163
+ # @return [String, nil]
4164
+ optional :reference_id, String, nil?: true
4165
+
4166
+ # @!method initialize(cadence:, grouped_tiered_matrix_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_tiered_matrix)
4167
+ # Some parameter documentations has been truncated, see
4168
+ # {Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedTieredMatrix}
4169
+ # for more details.
4170
+ #
4171
+ # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedTieredMatrix::Cadence] The cadence to bill for this price on.
4172
+ #
4173
+ # @param grouped_tiered_matrix_config [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig] Configuration for grouped_tiered_matrix pricing
4174
+ #
4175
+ # @param item_id [String] The id of the item the price will be associated with.
4176
+ #
4177
+ # @param name [String] The name of the price.
4178
+ #
4179
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
4180
+ #
4181
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
4182
+ #
4183
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
4184
+ #
4185
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
4186
+ #
4187
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
4188
+ #
4189
+ # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr
4190
+ #
4191
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
4192
+ #
4193
+ # @param external_price_id [String, nil] An alias for the price.
4194
+ #
4195
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
4196
+ #
4197
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
4198
+ #
4199
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
4200
+ #
4201
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
4202
+ #
4203
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
4204
+ #
4205
+ # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
4206
+ #
4207
+ # @param model_type [Symbol, :grouped_tiered_matrix] The pricing model type
4208
+
4209
+ # The cadence to bill for this price on.
4210
+ #
4211
+ # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedTieredMatrix#cadence
4212
+ module Cadence
4213
+ extend Orb::Internal::Type::Enum
4214
+
4215
+ ANNUAL = :annual
4216
+ SEMI_ANNUAL = :semi_annual
4217
+ MONTHLY = :monthly
4218
+ QUARTERLY = :quarterly
4219
+ ONE_TIME = :one_time
4220
+ CUSTOM = :custom
4221
+
4222
+ # @!method self.values
4223
+ # @return [Array<Symbol>]
4224
+ end
4225
+
4226
+ # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedTieredMatrix#grouped_tiered_matrix_config
4227
+ class GroupedTieredMatrixConfig < Orb::Internal::Type::BaseModel
4228
+ # @!attribute default_unit_amount
4229
+ # Per unit rate for usage whose dimension value has no configured tiers
4230
+ #
4231
+ # @return [String]
4232
+ required :default_unit_amount, String
4233
+
4234
+ # @!attribute dimension
4235
+ # The billable metric property used to group usage before tiering
4236
+ #
4237
+ # @return [String]
4238
+ required :dimension, String
4239
+
4240
+ # @!attribute tiers
4241
+ # Graduated tiers keyed by dimension value; usage for a value is tiered only
4242
+ # against its own rows
4243
+ #
4244
+ # @return [Array<Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier>]
4245
+ required :tiers,
4246
+ -> { Orb::Internal::Type::ArrayOf[Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier] }
4247
+
4248
+ # @!method initialize(default_unit_amount:, dimension:, tiers:)
4249
+ # Some parameter documentations has been truncated, see
4250
+ # {Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig}
4251
+ # for more details.
4252
+ #
4253
+ # Configuration for grouped_tiered_matrix pricing
4254
+ #
4255
+ # @param default_unit_amount [String] Per unit rate for usage whose dimension value has no configured tiers
4256
+ #
4257
+ # @param dimension [String] The billable metric property used to group usage before tiering
4258
+ #
4259
+ # @param tiers [Array<Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier>] Graduated tiers keyed by dimension value; usage for a value is tiered only again
4260
+
4261
+ class Tier < Orb::Internal::Type::BaseModel
4262
+ # @!attribute dimension_value
4263
+ # The dimension value this tier applies to
4264
+ #
4265
+ # @return [String]
4266
+ required :dimension_value, String
4267
+
4268
+ # @!attribute tier_lower_bound
4269
+ #
4270
+ # @return [String]
4271
+ required :tier_lower_bound, String
4272
+
4273
+ # @!attribute unit_amount
4274
+ # Per unit amount
4275
+ #
4276
+ # @return [String]
4277
+ required :unit_amount, String
4278
+
4279
+ # @!method initialize(dimension_value:, tier_lower_bound:, unit_amount:)
4280
+ # Configuration for a single tier scoped to a dimension value
4281
+ #
4282
+ # @param dimension_value [String] The dimension value this tier applies to
4283
+ #
4284
+ # @param tier_lower_bound [String]
4285
+ #
4286
+ # @param unit_amount [String] Per unit amount
4287
+ end
4288
+ end
4289
+ end
4290
+
3776
4291
  class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel
3777
4292
  # @!attribute cadence
3778
4293
  # The cadence to bill for this price on.
@@ -5771,7 +6286,7 @@ module Orb
5771
6286
  end
5772
6287
 
5773
6288
  # @!method self.variants
5774
- # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput)]
6289
+ # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedTieredMatrix, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput)]
5775
6290
  end
5776
6291
  end
5777
6292
  end