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
@@ -144,7 +144,7 @@ module Orb
144
144
  # @!attribute price
145
145
  # New floating price request body params.
146
146
  #
147
- # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedTieredMatrix, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil]
147
+ # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedTieredMatrix, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier, nil]
148
148
  optional :price,
149
149
  union: -> {
150
150
  Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price
@@ -170,7 +170,7 @@ module Orb
170
170
  #
171
171
  # @param metric_parameter_overrides [Hash{Symbol=>Object}, nil] Optional overrides for parameterized billable metric parameters. If the metric h
172
172
  #
173
- # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedTieredMatrix, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil] New floating price request body params.
173
+ # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedTieredMatrix, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier, nil] New floating price request body params.
174
174
  #
175
175
  # @param price_id [String, nil] The ID of a price to evaluate that exists in your Orb account.
176
176
 
@@ -262,6 +262,9 @@ module Orb
262
262
 
263
263
  variant :event_output, -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput }
264
264
 
265
+ variant :unit_with_multiplier,
266
+ -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier }
267
+
265
268
  class BulkWithFilters < Orb::Internal::Type::BaseModel
266
269
  # @!attribute bulk_with_filters_config
267
270
  # Configuration for bulk_with_filters pricing
@@ -2766,8 +2769,240 @@ module Orb
2766
2769
  end
2767
2770
  end
2768
2771
 
2772
+ class UnitWithMultiplier < Orb::Internal::Type::BaseModel
2773
+ # @!attribute cadence
2774
+ # The cadence to bill for this price on.
2775
+ #
2776
+ # @return [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence]
2777
+ required :cadence,
2778
+ enum: -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence }
2779
+
2780
+ # @!attribute currency
2781
+ # An ISO 4217 currency string for which this price is billed in.
2782
+ #
2783
+ # @return [String]
2784
+ required :currency, String
2785
+
2786
+ # @!attribute item_id
2787
+ # The id of the item the price will be associated with.
2788
+ #
2789
+ # @return [String]
2790
+ required :item_id, String
2791
+
2792
+ # @!attribute model_type
2793
+ # The pricing model type
2794
+ #
2795
+ # @return [Symbol, :unit_with_multiplier]
2796
+ required :model_type, const: :unit_with_multiplier
2797
+
2798
+ # @!attribute name
2799
+ # The name of the price.
2800
+ #
2801
+ # @return [String]
2802
+ required :name, String
2803
+
2804
+ # @!attribute unit_with_multiplier_config
2805
+ # Configuration for unit_with_multiplier pricing
2806
+ #
2807
+ # @return [Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::UnitWithMultiplierConfig]
2808
+ required :unit_with_multiplier_config,
2809
+ -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::UnitWithMultiplierConfig }
2810
+
2811
+ # @!attribute billable_metric_id
2812
+ # The id of the billable metric for the price. Only needed if the price is
2813
+ # usage-based.
2814
+ #
2815
+ # @return [String, nil]
2816
+ optional :billable_metric_id, String, nil?: true
2817
+
2818
+ # @!attribute billed_in_advance
2819
+ # If the Price represents a fixed cost, the price will be billed in-advance if
2820
+ # this is true, and in-arrears if this is false.
2821
+ #
2822
+ # @return [Boolean, nil]
2823
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
2824
+
2825
+ # @!attribute billing_cycle_configuration
2826
+ # For custom cadence: specifies the duration of the billing period in days or
2827
+ # months.
2828
+ #
2829
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
2830
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
2831
+
2832
+ # @!attribute conversion_rate
2833
+ # The per unit conversion rate of the price currency to the invoicing currency.
2834
+ #
2835
+ # @return [Float, nil]
2836
+ optional :conversion_rate, Float, nil?: true
2837
+
2838
+ # @!attribute conversion_rate_config
2839
+ # The configuration for the rate of the price currency to the invoicing currency.
2840
+ #
2841
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
2842
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
2843
+
2844
+ # @!attribute dimensional_price_configuration
2845
+ # For dimensional price: specifies a price group and dimension values
2846
+ #
2847
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
2848
+ optional :dimensional_price_configuration,
2849
+ -> {
2850
+ Orb::NewDimensionalPriceConfiguration
2851
+ },
2852
+ nil?: true
2853
+
2854
+ # @!attribute external_price_id
2855
+ # An alias for the price.
2856
+ #
2857
+ # @return [String, nil]
2858
+ optional :external_price_id, String, nil?: true
2859
+
2860
+ # @!attribute fixed_price_quantity
2861
+ # If the Price represents a fixed cost, this represents the quantity of units
2862
+ # applied.
2863
+ #
2864
+ # @return [Float, nil]
2865
+ optional :fixed_price_quantity, Float, nil?: true
2866
+
2867
+ # @!attribute invoice_grouping_key
2868
+ # The property used to group this price on an invoice
2869
+ #
2870
+ # @return [String, nil]
2871
+ optional :invoice_grouping_key, String, nil?: true
2872
+
2873
+ # @!attribute invoicing_cycle_configuration
2874
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
2875
+ # If unspecified, a single invoice is produced per billing cycle.
2876
+ #
2877
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
2878
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
2879
+
2880
+ # @!attribute license_type_id
2881
+ # The ID of the license type to associate with this price. On a usage price this
2882
+ # also marks the price as eligible to draw down from that license type's
2883
+ # allocation; a usage price created without it is billed normally. Usage prices
2884
+ # with a license type must use the `unit` model, and only draw down when their
2885
+ # currency matches the allocation's.
2886
+ #
2887
+ # @return [String, nil]
2888
+ optional :license_type_id, String, nil?: true
2889
+
2890
+ # @!attribute metadata
2891
+ # User-specified key/value pairs for the resource. Individual keys can be removed
2892
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
2893
+ # by setting `metadata` to `null`.
2894
+ #
2895
+ # @return [Hash{Symbol=>String, nil}, nil]
2896
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
2897
+
2898
+ # @!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)
2899
+ # Some parameter documentations has been truncated, see
2900
+ # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier}
2901
+ # for more details.
2902
+ #
2903
+ # @param cadence [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence] The cadence to bill for this price on.
2904
+ #
2905
+ # @param currency [String] An ISO 4217 currency string for which this price is billed in.
2906
+ #
2907
+ # @param item_id [String] The id of the item the price will be associated with.
2908
+ #
2909
+ # @param name [String] The name of the price.
2910
+ #
2911
+ # @param unit_with_multiplier_config [Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::UnitWithMultiplierConfig] Configuration for unit_with_multiplier pricing
2912
+ #
2913
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
2914
+ #
2915
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
2916
+ #
2917
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
2918
+ #
2919
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
2920
+ #
2921
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
2922
+ #
2923
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
2924
+ #
2925
+ # @param external_price_id [String, nil] An alias for the price.
2926
+ #
2927
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
2928
+ #
2929
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
2930
+ #
2931
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
2932
+ #
2933
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price. On a usage price this a
2934
+ #
2935
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
2936
+ #
2937
+ # @param model_type [Symbol, :unit_with_multiplier] The pricing model type
2938
+
2939
+ # The cadence to bill for this price on.
2940
+ #
2941
+ # @see Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier#cadence
2942
+ module Cadence
2943
+ extend Orb::Internal::Type::Enum
2944
+
2945
+ ONE_TIME = :one_time
2946
+ MONTHLY = :monthly
2947
+ QUARTERLY = :quarterly
2948
+ SEMI_ANNUAL = :semi_annual
2949
+ ANNUAL = :annual
2950
+ CUSTOM = :custom
2951
+
2952
+ # @!method self.values
2953
+ # @return [Array<Symbol>]
2954
+ end
2955
+
2956
+ # @see Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier#unit_with_multiplier_config
2957
+ class UnitWithMultiplierConfig < Orb::Internal::Type::BaseModel
2958
+ # @!attribute default_display_name
2959
+ # Sub-line label for list-price events that don't set display_name_key. Unlabeled
2960
+ # events with another multiplier are labeled by their multiplier (e.g. '0.8×
2961
+ # rate').
2962
+ #
2963
+ # @return [String]
2964
+ required :default_display_name, String
2965
+
2966
+ # @!attribute display_name_key
2967
+ # Event property holding the sub-line label for the event's rate (e.g.
2968
+ # 'Off-peak').
2969
+ #
2970
+ # @return [String]
2971
+ required :display_name_key, String
2972
+
2973
+ # @!attribute multiplier_key
2974
+ # Event property holding the multiplier applied to unit_amount (e.g. 0.8 for a 20%
2975
+ # discount). Events without a number between 0 and 1000 with at most 12 decimal
2976
+ # places are charged at unit_amount.
2977
+ #
2978
+ # @return [String]
2979
+ required :multiplier_key, String
2980
+
2981
+ # @!attribute unit_amount
2982
+ # List price per unit, before the event's multiplier is applied.
2983
+ #
2984
+ # @return [String]
2985
+ required :unit_amount, String
2986
+
2987
+ # @!method initialize(default_display_name:, display_name_key:, multiplier_key:, unit_amount:)
2988
+ # Some parameter documentations has been truncated, see
2989
+ # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::UnitWithMultiplierConfig}
2990
+ # for more details.
2991
+ #
2992
+ # Configuration for unit_with_multiplier pricing
2993
+ #
2994
+ # @param default_display_name [String] Sub-line label for list-price events that don't set display_name_key. Unlabeled
2995
+ #
2996
+ # @param display_name_key [String] Event property holding the sub-line label for the event's rate (e.g. 'Off-peak')
2997
+ #
2998
+ # @param multiplier_key [String] Event property holding the multiplier applied to unit_amount (e.g. 0.8 for a 20%
2999
+ #
3000
+ # @param unit_amount [String] List price per unit, before the event's multiplier is applied.
3001
+ end
3002
+ end
3003
+
2769
3004
  # @!method self.variants
2770
- # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedTieredMatrix, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput)]
3005
+ # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedTieredMatrix, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier)]
2771
3006
  end
2772
3007
  end
2773
3008
  end
@@ -72,7 +72,7 @@ module Orb
72
72
  # For more on the types of prices, see
73
73
  # [the core concepts documentation](/core-concepts#plan-and-price)
74
74
  #
75
- # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::GroupedTieredMatrix, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredMatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput]
75
+ # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::GroupedTieredMatrix, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredMatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput, Orb::Models::Price::UnitWithMultiplier]
76
76
  required :price, union: -> { Orb::Price }
77
77
 
78
78
  # @!attribute start_date
@@ -122,7 +122,7 @@ module Orb
122
122
  #
123
123
  # @param fixed_fee_quantity_transitions [Array<Orb::Models::FixedFeeQuantityTransition>, nil] The fixed fee quantity transitions for this price interval. This is only relevan
124
124
  #
125
- # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::GroupedTieredMatrix, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredMatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu
125
+ # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::GroupedTieredMatrix, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredMatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput, Orb::Models::Price::UnitWithMultiplier] The Price resource represents a price that can be billed on a subscription, resu
126
126
  #
127
127
  # @param start_date [Time] The start date of the price interval. This is the date that Orb starts billing f
128
128
  #