orb-billing 1.54.0 → 1.55.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 (94) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +496 -6
  5. data/lib/orb/models/beta_create_plan_version_params.rb +496 -6
  6. data/lib/orb/models/changed_subscription_resources.rb +2 -2
  7. data/lib/orb/models/credit_block_accounting_sync_failed_webhook_event.rb +4 -4
  8. data/lib/orb/models/credit_block_accounting_sync_succeeded_webhook_event.rb +4 -4
  9. data/lib/orb/models/credit_block_list_invoices_response.rb +4 -4
  10. data/lib/orb/models/credit_block_retrieve_response.rb +4 -4
  11. data/lib/orb/models/credit_block_update_response.rb +4 -4
  12. data/lib/orb/models/customer_credit_ledger_incremented_webhook_event.rb +4 -4
  13. data/lib/orb/models/dimensional_price_groups/price_create_response.rb +2 -2
  14. data/lib/orb/models/invoice.rb +2 -2
  15. data/lib/orb/models/invoice_edited_webhook_event.rb +2 -2
  16. data/lib/orb/models/invoice_fetch_upcoming_response.rb +2 -2
  17. data/lib/orb/models/invoice_line_item_create_response.rb +2 -2
  18. data/lib/orb/models/per_price_cost.rb +2 -2
  19. data/lib/orb/models/plan.rb +2 -2
  20. data/lib/orb/models/plan_create_params.rb +246 -3
  21. data/lib/orb/models/plan_version.rb +2 -2
  22. data/lib/orb/models/price.rb +416 -1
  23. data/lib/orb/models/price_create_params.rb +231 -3
  24. data/lib/orb/models/price_edited_webhook_event.rb +2 -2
  25. data/lib/orb/models/price_evaluate_multiple_params.rb +238 -3
  26. data/lib/orb/models/price_evaluate_preview_events_params.rb +238 -3
  27. data/lib/orb/models/price_interval.rb +2 -2
  28. data/lib/orb/models/subscription_create_params.rb +495 -6
  29. data/lib/orb/models/subscription_price_intervals_params.rb +238 -3
  30. data/lib/orb/models/subscription_schedule_plan_change_params.rb +496 -6
  31. data/lib/orb/models/webhooks/credit_block_accounting_sync_failed_standard_webhook_event.rb +4 -4
  32. data/lib/orb/models/webhooks/credit_block_accounting_sync_succeeded_standard_webhook_event.rb +4 -4
  33. data/lib/orb/models/webhooks/customer_credit_ledger_incremented_standard_webhook_event.rb +4 -4
  34. data/lib/orb/models/webhooks/invoice_edited_standard_webhook_event.rb +2 -2
  35. data/lib/orb/models/webhooks/price_edited_standard_webhook_event.rb +2 -2
  36. data/lib/orb/resources/credit_blocks.rb +1 -1
  37. data/lib/orb/resources/dimensional_price_groups/prices.rb +1 -1
  38. data/lib/orb/resources/prices/external_price_id.rb +2 -2
  39. data/lib/orb/resources/prices.rb +5 -5
  40. data/lib/orb/version.rb +1 -1
  41. data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +2939 -2129
  42. data/rbi/orb/models/beta_create_plan_version_params.rbi +2937 -2127
  43. data/rbi/orb/models/changed_subscription_resources.rbi +2 -1
  44. data/rbi/orb/models/credit_block_accounting_sync_failed_webhook_event.rbi +5 -5
  45. data/rbi/orb/models/credit_block_accounting_sync_succeeded_webhook_event.rbi +5 -5
  46. data/rbi/orb/models/credit_block_list_invoices_response.rbi +5 -5
  47. data/rbi/orb/models/credit_block_retrieve_response.rbi +5 -5
  48. data/rbi/orb/models/credit_block_update_response.rbi +5 -5
  49. data/rbi/orb/models/customer_credit_ledger_incremented_webhook_event.rbi +5 -5
  50. data/rbi/orb/models/dimensional_price_groups/price_create_response.rbi +2 -1
  51. data/rbi/orb/models/invoice.rbi +2 -1
  52. data/rbi/orb/models/invoice_edited_webhook_event.rbi +2 -1
  53. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +2 -1
  54. data/rbi/orb/models/invoice_line_item_create_response.rbi +2 -1
  55. data/rbi/orb/models/per_price_cost.rbi +2 -1
  56. data/rbi/orb/models/plan.rbi +2 -1
  57. data/rbi/orb/models/plan_create_params.rbi +409 -4
  58. data/rbi/orb/models/plan_version.rbi +2 -1
  59. data/rbi/orb/models/price.rbi +716 -1
  60. data/rbi/orb/models/price_create_params.rbi +397 -4
  61. data/rbi/orb/models/price_edited_webhook_event.rbi +2 -1
  62. data/rbi/orb/models/price_evaluate_multiple_params.rbi +397 -4
  63. data/rbi/orb/models/price_evaluate_preview_events_params.rbi +397 -4
  64. data/rbi/orb/models/price_interval.rbi +2 -1
  65. data/rbi/orb/models/subscription_create_params.rbi +2676 -1866
  66. data/rbi/orb/models/subscription_price_intervals_params.rbi +397 -4
  67. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +2686 -1876
  68. data/rbi/orb/models/webhooks/credit_block_accounting_sync_failed_standard_webhook_event.rbi +5 -5
  69. data/rbi/orb/models/webhooks/credit_block_accounting_sync_succeeded_standard_webhook_event.rbi +5 -5
  70. data/rbi/orb/models/webhooks/customer_credit_ledger_incremented_standard_webhook_event.rbi +5 -5
  71. data/rbi/orb/models/webhooks/invoice_edited_standard_webhook_event.rbi +2 -1
  72. data/rbi/orb/models/webhooks/price_edited_standard_webhook_event.rbi +2 -1
  73. data/rbi/orb/resources/credit_blocks.rbi +1 -1
  74. data/rbi/orb/resources/prices.rbi +2 -1
  75. data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +322 -0
  76. data/sig/orb/models/beta_create_plan_version_params.rbs +322 -0
  77. data/sig/orb/models/credit_block_accounting_sync_failed_webhook_event.rbs +2 -2
  78. data/sig/orb/models/credit_block_accounting_sync_succeeded_webhook_event.rbs +2 -2
  79. data/sig/orb/models/credit_block_list_invoices_response.rbs +2 -2
  80. data/sig/orb/models/credit_block_retrieve_response.rbs +2 -2
  81. data/sig/orb/models/credit_block_update_response.rbs +2 -2
  82. data/sig/orb/models/customer_credit_ledger_incremented_webhook_event.rbs +2 -2
  83. data/sig/orb/models/plan_create_params.rbs +161 -0
  84. data/sig/orb/models/price.rbs +305 -0
  85. data/sig/orb/models/price_create_params.rbs +151 -0
  86. data/sig/orb/models/price_evaluate_multiple_params.rbs +156 -0
  87. data/sig/orb/models/price_evaluate_preview_events_params.rbs +156 -0
  88. data/sig/orb/models/subscription_create_params.rbs +322 -0
  89. data/sig/orb/models/subscription_price_intervals_params.rbs +156 -0
  90. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +322 -0
  91. data/sig/orb/models/webhooks/credit_block_accounting_sync_failed_standard_webhook_event.rbs +2 -2
  92. data/sig/orb/models/webhooks/credit_block_accounting_sync_succeeded_standard_webhook_event.rbs +2 -2
  93. data/sig/orb/models/webhooks/customer_credit_ledger_incremented_standard_webhook_event.rbs +2 -2
  94. metadata +1 -1
@@ -163,7 +163,7 @@ module Orb
163
163
  # @!attribute price
164
164
  # New floating price request body params.
165
165
  #
166
- # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput, nil]
166
+ # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::UnitWithMultiplier, nil]
167
167
  optional :price, union: -> { Orb::SubscriptionPriceIntervalsParams::Add::Price }, nil?: true
168
168
 
169
169
  # @!attribute price_id
@@ -209,7 +209,7 @@ module Orb
209
209
  #
210
210
  # @param minimum_amount [Float, nil] The minimum amount that will be billed for this price interval for a given billi
211
211
  #
212
- # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput, nil] New floating price request body params.
212
+ # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::UnitWithMultiplier, nil] New floating price request body params.
213
213
  #
214
214
  # @param price_id [String, nil] The id of the price to add to the subscription.
215
215
  #
@@ -429,6 +429,9 @@ module Orb
429
429
 
430
430
  variant :event_output, -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::EventOutput }
431
431
 
432
+ variant :unit_with_multiplier,
433
+ -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::UnitWithMultiplier }
434
+
432
435
  class BulkWithFilters < Orb::Internal::Type::BaseModel
433
436
  # @!attribute bulk_with_filters_config
434
437
  # Configuration for bulk_with_filters pricing
@@ -2918,8 +2921,240 @@ module Orb
2918
2921
  end
2919
2922
  end
2920
2923
 
2924
+ class UnitWithMultiplier < Orb::Internal::Type::BaseModel
2925
+ # @!attribute cadence
2926
+ # The cadence to bill for this price on.
2927
+ #
2928
+ # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::UnitWithMultiplier::Cadence]
2929
+ required :cadence,
2930
+ enum: -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::UnitWithMultiplier::Cadence }
2931
+
2932
+ # @!attribute currency
2933
+ # An ISO 4217 currency string for which this price is billed in.
2934
+ #
2935
+ # @return [String]
2936
+ required :currency, String
2937
+
2938
+ # @!attribute item_id
2939
+ # The id of the item the price will be associated with.
2940
+ #
2941
+ # @return [String]
2942
+ required :item_id, String
2943
+
2944
+ # @!attribute model_type
2945
+ # The pricing model type
2946
+ #
2947
+ # @return [Symbol, :unit_with_multiplier]
2948
+ required :model_type, const: :unit_with_multiplier
2949
+
2950
+ # @!attribute name
2951
+ # The name of the price.
2952
+ #
2953
+ # @return [String]
2954
+ required :name, String
2955
+
2956
+ # @!attribute unit_with_multiplier_config
2957
+ # Configuration for unit_with_multiplier pricing
2958
+ #
2959
+ # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::UnitWithMultiplier::UnitWithMultiplierConfig]
2960
+ required :unit_with_multiplier_config,
2961
+ -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::UnitWithMultiplier::UnitWithMultiplierConfig }
2962
+
2963
+ # @!attribute billable_metric_id
2964
+ # The id of the billable metric for the price. Only needed if the price is
2965
+ # usage-based.
2966
+ #
2967
+ # @return [String, nil]
2968
+ optional :billable_metric_id, String, nil?: true
2969
+
2970
+ # @!attribute billed_in_advance
2971
+ # If the Price represents a fixed cost, the price will be billed in-advance if
2972
+ # this is true, and in-arrears if this is false.
2973
+ #
2974
+ # @return [Boolean, nil]
2975
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
2976
+
2977
+ # @!attribute billing_cycle_configuration
2978
+ # For custom cadence: specifies the duration of the billing period in days or
2979
+ # months.
2980
+ #
2981
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
2982
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
2983
+
2984
+ # @!attribute conversion_rate
2985
+ # The per unit conversion rate of the price currency to the invoicing currency.
2986
+ #
2987
+ # @return [Float, nil]
2988
+ optional :conversion_rate, Float, nil?: true
2989
+
2990
+ # @!attribute conversion_rate_config
2991
+ # The configuration for the rate of the price currency to the invoicing currency.
2992
+ #
2993
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
2994
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
2995
+
2996
+ # @!attribute dimensional_price_configuration
2997
+ # For dimensional price: specifies a price group and dimension values
2998
+ #
2999
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
3000
+ optional :dimensional_price_configuration,
3001
+ -> {
3002
+ Orb::NewDimensionalPriceConfiguration
3003
+ },
3004
+ nil?: true
3005
+
3006
+ # @!attribute external_price_id
3007
+ # An alias for the price.
3008
+ #
3009
+ # @return [String, nil]
3010
+ optional :external_price_id, String, nil?: true
3011
+
3012
+ # @!attribute fixed_price_quantity
3013
+ # If the Price represents a fixed cost, this represents the quantity of units
3014
+ # applied.
3015
+ #
3016
+ # @return [Float, nil]
3017
+ optional :fixed_price_quantity, Float, nil?: true
3018
+
3019
+ # @!attribute invoice_grouping_key
3020
+ # The property used to group this price on an invoice
3021
+ #
3022
+ # @return [String, nil]
3023
+ optional :invoice_grouping_key, String, nil?: true
3024
+
3025
+ # @!attribute invoicing_cycle_configuration
3026
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
3027
+ # If unspecified, a single invoice is produced per billing cycle.
3028
+ #
3029
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
3030
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
3031
+
3032
+ # @!attribute license_type_id
3033
+ # The ID of the license type to associate with this price. On a usage price this
3034
+ # also marks the price as eligible to draw down from that license type's
3035
+ # allocation; a usage price created without it is billed normally. Usage prices
3036
+ # with a license type must use the `unit` model, and only draw down when their
3037
+ # currency matches the allocation's.
3038
+ #
3039
+ # @return [String, nil]
3040
+ optional :license_type_id, String, nil?: true
3041
+
3042
+ # @!attribute metadata
3043
+ # User-specified key/value pairs for the resource. Individual keys can be removed
3044
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
3045
+ # by setting `metadata` to `null`.
3046
+ #
3047
+ # @return [Hash{Symbol=>String, nil}, nil]
3048
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
3049
+
3050
+ # @!method initialize(cadence:, currency:, item_id:, name:, unit_with_multiplier_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: 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, model_type: :unit_with_multiplier)
3051
+ # Some parameter documentations has been truncated, see
3052
+ # {Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::UnitWithMultiplier}
3053
+ # for more details.
3054
+ #
3055
+ # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::UnitWithMultiplier::Cadence] The cadence to bill for this price on.
3056
+ #
3057
+ # @param currency [String] An ISO 4217 currency string for which this price is billed in.
3058
+ #
3059
+ # @param item_id [String] The id of the item the price will be associated with.
3060
+ #
3061
+ # @param name [String] The name of the price.
3062
+ #
3063
+ # @param unit_with_multiplier_config [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::UnitWithMultiplier::UnitWithMultiplierConfig] Configuration for unit_with_multiplier pricing
3064
+ #
3065
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
3066
+ #
3067
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
3068
+ #
3069
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
3070
+ #
3071
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
3072
+ #
3073
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
3074
+ #
3075
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
3076
+ #
3077
+ # @param external_price_id [String, nil] An alias for the price.
3078
+ #
3079
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
3080
+ #
3081
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
3082
+ #
3083
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
3084
+ #
3085
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price. On a usage price this a
3086
+ #
3087
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
3088
+ #
3089
+ # @param model_type [Symbol, :unit_with_multiplier] The pricing model type
3090
+
3091
+ # The cadence to bill for this price on.
3092
+ #
3093
+ # @see Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::UnitWithMultiplier#cadence
3094
+ module Cadence
3095
+ extend Orb::Internal::Type::Enum
3096
+
3097
+ ONE_TIME = :one_time
3098
+ MONTHLY = :monthly
3099
+ QUARTERLY = :quarterly
3100
+ SEMI_ANNUAL = :semi_annual
3101
+ ANNUAL = :annual
3102
+ CUSTOM = :custom
3103
+
3104
+ # @!method self.values
3105
+ # @return [Array<Symbol>]
3106
+ end
3107
+
3108
+ # @see Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::UnitWithMultiplier#unit_with_multiplier_config
3109
+ class UnitWithMultiplierConfig < Orb::Internal::Type::BaseModel
3110
+ # @!attribute default_display_name
3111
+ # Sub-line label for list-price events that don't set display_name_key. Unlabeled
3112
+ # events with another multiplier are labeled by their multiplier (e.g. '0.8×
3113
+ # rate').
3114
+ #
3115
+ # @return [String]
3116
+ required :default_display_name, String
3117
+
3118
+ # @!attribute display_name_key
3119
+ # Event property holding the sub-line label for the event's rate (e.g.
3120
+ # 'Off-peak').
3121
+ #
3122
+ # @return [String]
3123
+ required :display_name_key, String
3124
+
3125
+ # @!attribute multiplier_key
3126
+ # Event property holding the multiplier applied to unit_amount (e.g. 0.8 for a 20%
3127
+ # discount). Events without a number between 0 and 1000 with at most 12 decimal
3128
+ # places are charged at unit_amount.
3129
+ #
3130
+ # @return [String]
3131
+ required :multiplier_key, String
3132
+
3133
+ # @!attribute unit_amount
3134
+ # List price per unit, before the event's multiplier is applied.
3135
+ #
3136
+ # @return [String]
3137
+ required :unit_amount, String
3138
+
3139
+ # @!method initialize(default_display_name:, display_name_key:, multiplier_key:, unit_amount:)
3140
+ # Some parameter documentations has been truncated, see
3141
+ # {Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::UnitWithMultiplier::UnitWithMultiplierConfig}
3142
+ # for more details.
3143
+ #
3144
+ # Configuration for unit_with_multiplier pricing
3145
+ #
3146
+ # @param default_display_name [String] Sub-line label for list-price events that don't set display_name_key. Unlabeled
3147
+ #
3148
+ # @param display_name_key [String] Event property holding the sub-line label for the event's rate (e.g. 'Off-peak')
3149
+ #
3150
+ # @param multiplier_key [String] Event property holding the multiplier applied to unit_amount (e.g. 0.8 for a 20%
3151
+ #
3152
+ # @param unit_amount [String] List price per unit, before the event's multiplier is applied.
3153
+ end
3154
+ end
3155
+
2921
3156
  # @!method self.variants
2922
- # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput)]
3157
+ # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::UnitWithMultiplier)]
2923
3158
  end
2924
3159
  end
2925
3160