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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +496 -6
- data/lib/orb/models/beta_create_plan_version_params.rb +496 -6
- data/lib/orb/models/changed_subscription_resources.rb +2 -2
- data/lib/orb/models/credit_block_accounting_sync_failed_webhook_event.rb +4 -4
- data/lib/orb/models/credit_block_accounting_sync_succeeded_webhook_event.rb +4 -4
- data/lib/orb/models/credit_block_list_invoices_response.rb +4 -4
- data/lib/orb/models/credit_block_retrieve_response.rb +4 -4
- data/lib/orb/models/credit_block_update_response.rb +4 -4
- data/lib/orb/models/customer_credit_ledger_incremented_webhook_event.rb +4 -4
- data/lib/orb/models/dimensional_price_groups/price_create_response.rb +2 -2
- data/lib/orb/models/invoice.rb +2 -2
- data/lib/orb/models/invoice_edited_webhook_event.rb +2 -2
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +2 -2
- data/lib/orb/models/invoice_line_item_create_response.rb +2 -2
- data/lib/orb/models/per_price_cost.rb +2 -2
- data/lib/orb/models/plan.rb +2 -2
- data/lib/orb/models/plan_create_params.rb +246 -3
- data/lib/orb/models/plan_version.rb +2 -2
- data/lib/orb/models/price.rb +416 -1
- data/lib/orb/models/price_create_params.rb +231 -3
- data/lib/orb/models/price_edited_webhook_event.rb +2 -2
- data/lib/orb/models/price_evaluate_multiple_params.rb +238 -3
- data/lib/orb/models/price_evaluate_preview_events_params.rb +238 -3
- data/lib/orb/models/price_interval.rb +2 -2
- data/lib/orb/models/subscription_create_params.rb +495 -6
- data/lib/orb/models/subscription_price_intervals_params.rb +238 -3
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +496 -6
- data/lib/orb/models/webhooks/credit_block_accounting_sync_failed_standard_webhook_event.rb +4 -4
- data/lib/orb/models/webhooks/credit_block_accounting_sync_succeeded_standard_webhook_event.rb +4 -4
- data/lib/orb/models/webhooks/customer_credit_ledger_incremented_standard_webhook_event.rb +4 -4
- data/lib/orb/models/webhooks/invoice_edited_standard_webhook_event.rb +2 -2
- data/lib/orb/models/webhooks/price_edited_standard_webhook_event.rb +2 -2
- data/lib/orb/resources/credit_blocks.rb +1 -1
- data/lib/orb/resources/dimensional_price_groups/prices.rb +1 -1
- data/lib/orb/resources/prices/external_price_id.rb +2 -2
- data/lib/orb/resources/prices.rb +5 -5
- data/lib/orb/version.rb +1 -1
- data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +2939 -2129
- data/rbi/orb/models/beta_create_plan_version_params.rbi +2937 -2127
- data/rbi/orb/models/changed_subscription_resources.rbi +2 -1
- data/rbi/orb/models/credit_block_accounting_sync_failed_webhook_event.rbi +5 -5
- data/rbi/orb/models/credit_block_accounting_sync_succeeded_webhook_event.rbi +5 -5
- data/rbi/orb/models/credit_block_list_invoices_response.rbi +5 -5
- data/rbi/orb/models/credit_block_retrieve_response.rbi +5 -5
- data/rbi/orb/models/credit_block_update_response.rbi +5 -5
- data/rbi/orb/models/customer_credit_ledger_incremented_webhook_event.rbi +5 -5
- data/rbi/orb/models/dimensional_price_groups/price_create_response.rbi +2 -1
- data/rbi/orb/models/invoice.rbi +2 -1
- data/rbi/orb/models/invoice_edited_webhook_event.rbi +2 -1
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +2 -1
- data/rbi/orb/models/invoice_line_item_create_response.rbi +2 -1
- data/rbi/orb/models/per_price_cost.rbi +2 -1
- data/rbi/orb/models/plan.rbi +2 -1
- data/rbi/orb/models/plan_create_params.rbi +409 -4
- data/rbi/orb/models/plan_version.rbi +2 -1
- data/rbi/orb/models/price.rbi +716 -1
- data/rbi/orb/models/price_create_params.rbi +397 -4
- data/rbi/orb/models/price_edited_webhook_event.rbi +2 -1
- data/rbi/orb/models/price_evaluate_multiple_params.rbi +397 -4
- data/rbi/orb/models/price_evaluate_preview_events_params.rbi +397 -4
- data/rbi/orb/models/price_interval.rbi +2 -1
- data/rbi/orb/models/subscription_create_params.rbi +2676 -1866
- data/rbi/orb/models/subscription_price_intervals_params.rbi +397 -4
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +2686 -1876
- data/rbi/orb/models/webhooks/credit_block_accounting_sync_failed_standard_webhook_event.rbi +5 -5
- data/rbi/orb/models/webhooks/credit_block_accounting_sync_succeeded_standard_webhook_event.rbi +5 -5
- data/rbi/orb/models/webhooks/customer_credit_ledger_incremented_standard_webhook_event.rbi +5 -5
- data/rbi/orb/models/webhooks/invoice_edited_standard_webhook_event.rbi +2 -1
- data/rbi/orb/models/webhooks/price_edited_standard_webhook_event.rbi +2 -1
- data/rbi/orb/resources/credit_blocks.rbi +1 -1
- data/rbi/orb/resources/prices.rbi +2 -1
- data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +322 -0
- data/sig/orb/models/beta_create_plan_version_params.rbs +322 -0
- data/sig/orb/models/credit_block_accounting_sync_failed_webhook_event.rbs +2 -2
- data/sig/orb/models/credit_block_accounting_sync_succeeded_webhook_event.rbs +2 -2
- data/sig/orb/models/credit_block_list_invoices_response.rbs +2 -2
- data/sig/orb/models/credit_block_retrieve_response.rbs +2 -2
- data/sig/orb/models/credit_block_update_response.rbs +2 -2
- data/sig/orb/models/customer_credit_ledger_incremented_webhook_event.rbs +2 -2
- data/sig/orb/models/plan_create_params.rbs +161 -0
- data/sig/orb/models/price.rbs +305 -0
- data/sig/orb/models/price_create_params.rbs +151 -0
- data/sig/orb/models/price_evaluate_multiple_params.rbs +156 -0
- data/sig/orb/models/price_evaluate_preview_events_params.rbs +156 -0
- data/sig/orb/models/subscription_create_params.rbs +322 -0
- data/sig/orb/models/subscription_price_intervals_params.rbs +156 -0
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +322 -0
- data/sig/orb/models/webhooks/credit_block_accounting_sync_failed_standard_webhook_event.rbs +2 -2
- data/sig/orb/models/webhooks/credit_block_accounting_sync_succeeded_standard_webhook_event.rbs +2 -2
- data/sig/orb/models/webhooks/customer_credit_ledger_incremented_standard_webhook_event.rbs +2 -2
- metadata +1 -1
|
@@ -259,7 +259,8 @@ module Orb
|
|
|
259
259
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance,
|
|
260
260
|
Orb::NewFloatingMinimumCompositePrice,
|
|
261
261
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent,
|
|
262
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput
|
|
262
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput,
|
|
263
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier
|
|
263
264
|
)
|
|
264
265
|
)
|
|
265
266
|
)
|
|
@@ -314,7 +315,8 @@ module Orb
|
|
|
314
315
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::OrHash,
|
|
315
316
|
Orb::NewFloatingMinimumCompositePrice::OrHash,
|
|
316
317
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent::OrHash,
|
|
317
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput::OrHash
|
|
318
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput::OrHash,
|
|
319
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::OrHash
|
|
318
320
|
)
|
|
319
321
|
),
|
|
320
322
|
price_id: T.nilable(String)
|
|
@@ -387,7 +389,8 @@ module Orb
|
|
|
387
389
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance,
|
|
388
390
|
Orb::NewFloatingMinimumCompositePrice,
|
|
389
391
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent,
|
|
390
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput
|
|
392
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput,
|
|
393
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier
|
|
391
394
|
)
|
|
392
395
|
),
|
|
393
396
|
price_id: T.nilable(String)
|
|
@@ -439,7 +442,8 @@ module Orb
|
|
|
439
442
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance,
|
|
440
443
|
Orb::NewFloatingMinimumCompositePrice,
|
|
441
444
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent,
|
|
442
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput
|
|
445
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput,
|
|
446
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier
|
|
443
447
|
)
|
|
444
448
|
end
|
|
445
449
|
|
|
@@ -4711,6 +4715,395 @@ module Orb
|
|
|
4711
4715
|
end
|
|
4712
4716
|
end
|
|
4713
4717
|
|
|
4718
|
+
class UnitWithMultiplier < Orb::Internal::Type::BaseModel
|
|
4719
|
+
OrHash =
|
|
4720
|
+
T.type_alias do
|
|
4721
|
+
T.any(
|
|
4722
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier,
|
|
4723
|
+
Orb::Internal::AnyHash
|
|
4724
|
+
)
|
|
4725
|
+
end
|
|
4726
|
+
|
|
4727
|
+
# The cadence to bill for this price on.
|
|
4728
|
+
sig do
|
|
4729
|
+
returns(
|
|
4730
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence::OrSymbol
|
|
4731
|
+
)
|
|
4732
|
+
end
|
|
4733
|
+
attr_accessor :cadence
|
|
4734
|
+
|
|
4735
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
4736
|
+
sig { returns(String) }
|
|
4737
|
+
attr_accessor :currency
|
|
4738
|
+
|
|
4739
|
+
# The id of the item the price will be associated with.
|
|
4740
|
+
sig { returns(String) }
|
|
4741
|
+
attr_accessor :item_id
|
|
4742
|
+
|
|
4743
|
+
# The pricing model type
|
|
4744
|
+
sig { returns(Symbol) }
|
|
4745
|
+
attr_accessor :model_type
|
|
4746
|
+
|
|
4747
|
+
# The name of the price.
|
|
4748
|
+
sig { returns(String) }
|
|
4749
|
+
attr_accessor :name
|
|
4750
|
+
|
|
4751
|
+
# Configuration for unit_with_multiplier pricing
|
|
4752
|
+
sig do
|
|
4753
|
+
returns(
|
|
4754
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::UnitWithMultiplierConfig
|
|
4755
|
+
)
|
|
4756
|
+
end
|
|
4757
|
+
attr_reader :unit_with_multiplier_config
|
|
4758
|
+
|
|
4759
|
+
sig do
|
|
4760
|
+
params(
|
|
4761
|
+
unit_with_multiplier_config:
|
|
4762
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::UnitWithMultiplierConfig::OrHash
|
|
4763
|
+
).void
|
|
4764
|
+
end
|
|
4765
|
+
attr_writer :unit_with_multiplier_config
|
|
4766
|
+
|
|
4767
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
4768
|
+
# usage-based.
|
|
4769
|
+
sig { returns(T.nilable(String)) }
|
|
4770
|
+
attr_accessor :billable_metric_id
|
|
4771
|
+
|
|
4772
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
4773
|
+
# this is true, and in-arrears if this is false.
|
|
4774
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
4775
|
+
attr_accessor :billed_in_advance
|
|
4776
|
+
|
|
4777
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
4778
|
+
# months.
|
|
4779
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
4780
|
+
attr_reader :billing_cycle_configuration
|
|
4781
|
+
|
|
4782
|
+
sig do
|
|
4783
|
+
params(
|
|
4784
|
+
billing_cycle_configuration:
|
|
4785
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
4786
|
+
).void
|
|
4787
|
+
end
|
|
4788
|
+
attr_writer :billing_cycle_configuration
|
|
4789
|
+
|
|
4790
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
4791
|
+
sig { returns(T.nilable(Float)) }
|
|
4792
|
+
attr_accessor :conversion_rate
|
|
4793
|
+
|
|
4794
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
4795
|
+
sig do
|
|
4796
|
+
returns(
|
|
4797
|
+
T.nilable(
|
|
4798
|
+
T.any(
|
|
4799
|
+
Orb::UnitConversionRateConfig,
|
|
4800
|
+
Orb::TieredConversionRateConfig
|
|
4801
|
+
)
|
|
4802
|
+
)
|
|
4803
|
+
)
|
|
4804
|
+
end
|
|
4805
|
+
attr_accessor :conversion_rate_config
|
|
4806
|
+
|
|
4807
|
+
# For dimensional price: specifies a price group and dimension values
|
|
4808
|
+
sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
|
|
4809
|
+
attr_reader :dimensional_price_configuration
|
|
4810
|
+
|
|
4811
|
+
sig do
|
|
4812
|
+
params(
|
|
4813
|
+
dimensional_price_configuration:
|
|
4814
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
|
|
4815
|
+
).void
|
|
4816
|
+
end
|
|
4817
|
+
attr_writer :dimensional_price_configuration
|
|
4818
|
+
|
|
4819
|
+
# An alias for the price.
|
|
4820
|
+
sig { returns(T.nilable(String)) }
|
|
4821
|
+
attr_accessor :external_price_id
|
|
4822
|
+
|
|
4823
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
4824
|
+
# applied.
|
|
4825
|
+
sig { returns(T.nilable(Float)) }
|
|
4826
|
+
attr_accessor :fixed_price_quantity
|
|
4827
|
+
|
|
4828
|
+
# The property used to group this price on an invoice
|
|
4829
|
+
sig { returns(T.nilable(String)) }
|
|
4830
|
+
attr_accessor :invoice_grouping_key
|
|
4831
|
+
|
|
4832
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
4833
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
4834
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
4835
|
+
attr_reader :invoicing_cycle_configuration
|
|
4836
|
+
|
|
4837
|
+
sig do
|
|
4838
|
+
params(
|
|
4839
|
+
invoicing_cycle_configuration:
|
|
4840
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
4841
|
+
).void
|
|
4842
|
+
end
|
|
4843
|
+
attr_writer :invoicing_cycle_configuration
|
|
4844
|
+
|
|
4845
|
+
# The ID of the license type to associate with this price. On a usage price this
|
|
4846
|
+
# also marks the price as eligible to draw down from that license type's
|
|
4847
|
+
# allocation; a usage price created without it is billed normally. Usage prices
|
|
4848
|
+
# with a license type must use the `unit` model, and only draw down when their
|
|
4849
|
+
# currency matches the allocation's.
|
|
4850
|
+
sig { returns(T.nilable(String)) }
|
|
4851
|
+
attr_accessor :license_type_id
|
|
4852
|
+
|
|
4853
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
4854
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
4855
|
+
# by setting `metadata` to `null`.
|
|
4856
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
4857
|
+
attr_accessor :metadata
|
|
4858
|
+
|
|
4859
|
+
sig do
|
|
4860
|
+
params(
|
|
4861
|
+
cadence:
|
|
4862
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence::OrSymbol,
|
|
4863
|
+
currency: String,
|
|
4864
|
+
item_id: String,
|
|
4865
|
+
name: String,
|
|
4866
|
+
unit_with_multiplier_config:
|
|
4867
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::UnitWithMultiplierConfig::OrHash,
|
|
4868
|
+
billable_metric_id: T.nilable(String),
|
|
4869
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
4870
|
+
billing_cycle_configuration:
|
|
4871
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
4872
|
+
conversion_rate: T.nilable(Float),
|
|
4873
|
+
conversion_rate_config:
|
|
4874
|
+
T.nilable(
|
|
4875
|
+
T.any(
|
|
4876
|
+
Orb::UnitConversionRateConfig::OrHash,
|
|
4877
|
+
Orb::TieredConversionRateConfig::OrHash
|
|
4878
|
+
)
|
|
4879
|
+
),
|
|
4880
|
+
dimensional_price_configuration:
|
|
4881
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
|
|
4882
|
+
external_price_id: T.nilable(String),
|
|
4883
|
+
fixed_price_quantity: T.nilable(Float),
|
|
4884
|
+
invoice_grouping_key: T.nilable(String),
|
|
4885
|
+
invoicing_cycle_configuration:
|
|
4886
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
4887
|
+
license_type_id: T.nilable(String),
|
|
4888
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
4889
|
+
model_type: Symbol
|
|
4890
|
+
).returns(T.attached_class)
|
|
4891
|
+
end
|
|
4892
|
+
def self.new(
|
|
4893
|
+
# The cadence to bill for this price on.
|
|
4894
|
+
cadence:,
|
|
4895
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
4896
|
+
currency:,
|
|
4897
|
+
# The id of the item the price will be associated with.
|
|
4898
|
+
item_id:,
|
|
4899
|
+
# The name of the price.
|
|
4900
|
+
name:,
|
|
4901
|
+
# Configuration for unit_with_multiplier pricing
|
|
4902
|
+
unit_with_multiplier_config:,
|
|
4903
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
4904
|
+
# usage-based.
|
|
4905
|
+
billable_metric_id: nil,
|
|
4906
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
4907
|
+
# this is true, and in-arrears if this is false.
|
|
4908
|
+
billed_in_advance: nil,
|
|
4909
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
4910
|
+
# months.
|
|
4911
|
+
billing_cycle_configuration: nil,
|
|
4912
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
4913
|
+
conversion_rate: nil,
|
|
4914
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
4915
|
+
conversion_rate_config: nil,
|
|
4916
|
+
# For dimensional price: specifies a price group and dimension values
|
|
4917
|
+
dimensional_price_configuration: nil,
|
|
4918
|
+
# An alias for the price.
|
|
4919
|
+
external_price_id: nil,
|
|
4920
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
4921
|
+
# applied.
|
|
4922
|
+
fixed_price_quantity: nil,
|
|
4923
|
+
# The property used to group this price on an invoice
|
|
4924
|
+
invoice_grouping_key: nil,
|
|
4925
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
4926
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
4927
|
+
invoicing_cycle_configuration: nil,
|
|
4928
|
+
# The ID of the license type to associate with this price. On a usage price this
|
|
4929
|
+
# also marks the price as eligible to draw down from that license type's
|
|
4930
|
+
# allocation; a usage price created without it is billed normally. Usage prices
|
|
4931
|
+
# with a license type must use the `unit` model, and only draw down when their
|
|
4932
|
+
# currency matches the allocation's.
|
|
4933
|
+
license_type_id: nil,
|
|
4934
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
4935
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
4936
|
+
# by setting `metadata` to `null`.
|
|
4937
|
+
metadata: nil,
|
|
4938
|
+
# The pricing model type
|
|
4939
|
+
model_type: :unit_with_multiplier
|
|
4940
|
+
)
|
|
4941
|
+
end
|
|
4942
|
+
|
|
4943
|
+
sig do
|
|
4944
|
+
override.returns(
|
|
4945
|
+
{
|
|
4946
|
+
cadence:
|
|
4947
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence::OrSymbol,
|
|
4948
|
+
currency: String,
|
|
4949
|
+
item_id: String,
|
|
4950
|
+
model_type: Symbol,
|
|
4951
|
+
name: String,
|
|
4952
|
+
unit_with_multiplier_config:
|
|
4953
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::UnitWithMultiplierConfig,
|
|
4954
|
+
billable_metric_id: T.nilable(String),
|
|
4955
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
4956
|
+
billing_cycle_configuration:
|
|
4957
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
4958
|
+
conversion_rate: T.nilable(Float),
|
|
4959
|
+
conversion_rate_config:
|
|
4960
|
+
T.nilable(
|
|
4961
|
+
T.any(
|
|
4962
|
+
Orb::UnitConversionRateConfig,
|
|
4963
|
+
Orb::TieredConversionRateConfig
|
|
4964
|
+
)
|
|
4965
|
+
),
|
|
4966
|
+
dimensional_price_configuration:
|
|
4967
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration),
|
|
4968
|
+
external_price_id: T.nilable(String),
|
|
4969
|
+
fixed_price_quantity: T.nilable(Float),
|
|
4970
|
+
invoice_grouping_key: T.nilable(String),
|
|
4971
|
+
invoicing_cycle_configuration:
|
|
4972
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
4973
|
+
license_type_id: T.nilable(String),
|
|
4974
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)])
|
|
4975
|
+
}
|
|
4976
|
+
)
|
|
4977
|
+
end
|
|
4978
|
+
def to_hash
|
|
4979
|
+
end
|
|
4980
|
+
|
|
4981
|
+
# The cadence to bill for this price on.
|
|
4982
|
+
module Cadence
|
|
4983
|
+
extend Orb::Internal::Type::Enum
|
|
4984
|
+
|
|
4985
|
+
TaggedSymbol =
|
|
4986
|
+
T.type_alias do
|
|
4987
|
+
T.all(
|
|
4988
|
+
Symbol,
|
|
4989
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence
|
|
4990
|
+
)
|
|
4991
|
+
end
|
|
4992
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
4993
|
+
|
|
4994
|
+
ONE_TIME =
|
|
4995
|
+
T.let(
|
|
4996
|
+
:one_time,
|
|
4997
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence::TaggedSymbol
|
|
4998
|
+
)
|
|
4999
|
+
MONTHLY =
|
|
5000
|
+
T.let(
|
|
5001
|
+
:monthly,
|
|
5002
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence::TaggedSymbol
|
|
5003
|
+
)
|
|
5004
|
+
QUARTERLY =
|
|
5005
|
+
T.let(
|
|
5006
|
+
:quarterly,
|
|
5007
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence::TaggedSymbol
|
|
5008
|
+
)
|
|
5009
|
+
SEMI_ANNUAL =
|
|
5010
|
+
T.let(
|
|
5011
|
+
:semi_annual,
|
|
5012
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence::TaggedSymbol
|
|
5013
|
+
)
|
|
5014
|
+
ANNUAL =
|
|
5015
|
+
T.let(
|
|
5016
|
+
:annual,
|
|
5017
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence::TaggedSymbol
|
|
5018
|
+
)
|
|
5019
|
+
CUSTOM =
|
|
5020
|
+
T.let(
|
|
5021
|
+
:custom,
|
|
5022
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence::TaggedSymbol
|
|
5023
|
+
)
|
|
5024
|
+
|
|
5025
|
+
sig do
|
|
5026
|
+
override.returns(
|
|
5027
|
+
T::Array[
|
|
5028
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence::TaggedSymbol
|
|
5029
|
+
]
|
|
5030
|
+
)
|
|
5031
|
+
end
|
|
5032
|
+
def self.values
|
|
5033
|
+
end
|
|
5034
|
+
end
|
|
5035
|
+
|
|
5036
|
+
class UnitWithMultiplierConfig < Orb::Internal::Type::BaseModel
|
|
5037
|
+
OrHash =
|
|
5038
|
+
T.type_alias do
|
|
5039
|
+
T.any(
|
|
5040
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::UnitWithMultiplier::UnitWithMultiplierConfig,
|
|
5041
|
+
Orb::Internal::AnyHash
|
|
5042
|
+
)
|
|
5043
|
+
end
|
|
5044
|
+
|
|
5045
|
+
# Sub-line label for list-price events that don't set display_name_key. Unlabeled
|
|
5046
|
+
# events with another multiplier are labeled by their multiplier (e.g. '0.8×
|
|
5047
|
+
# rate').
|
|
5048
|
+
sig { returns(String) }
|
|
5049
|
+
attr_accessor :default_display_name
|
|
5050
|
+
|
|
5051
|
+
# Event property holding the sub-line label for the event's rate (e.g.
|
|
5052
|
+
# 'Off-peak').
|
|
5053
|
+
sig { returns(String) }
|
|
5054
|
+
attr_accessor :display_name_key
|
|
5055
|
+
|
|
5056
|
+
# Event property holding the multiplier applied to unit_amount (e.g. 0.8 for a 20%
|
|
5057
|
+
# discount). Events without a number between 0 and 1000 with at most 12 decimal
|
|
5058
|
+
# places are charged at unit_amount.
|
|
5059
|
+
sig { returns(String) }
|
|
5060
|
+
attr_accessor :multiplier_key
|
|
5061
|
+
|
|
5062
|
+
# List price per unit, before the event's multiplier is applied.
|
|
5063
|
+
sig { returns(String) }
|
|
5064
|
+
attr_accessor :unit_amount
|
|
5065
|
+
|
|
5066
|
+
# Configuration for unit_with_multiplier pricing
|
|
5067
|
+
sig do
|
|
5068
|
+
params(
|
|
5069
|
+
default_display_name: String,
|
|
5070
|
+
display_name_key: String,
|
|
5071
|
+
multiplier_key: String,
|
|
5072
|
+
unit_amount: String
|
|
5073
|
+
).returns(T.attached_class)
|
|
5074
|
+
end
|
|
5075
|
+
def self.new(
|
|
5076
|
+
# Sub-line label for list-price events that don't set display_name_key. Unlabeled
|
|
5077
|
+
# events with another multiplier are labeled by their multiplier (e.g. '0.8×
|
|
5078
|
+
# rate').
|
|
5079
|
+
default_display_name:,
|
|
5080
|
+
# Event property holding the sub-line label for the event's rate (e.g.
|
|
5081
|
+
# 'Off-peak').
|
|
5082
|
+
display_name_key:,
|
|
5083
|
+
# Event property holding the multiplier applied to unit_amount (e.g. 0.8 for a 20%
|
|
5084
|
+
# discount). Events without a number between 0 and 1000 with at most 12 decimal
|
|
5085
|
+
# places are charged at unit_amount.
|
|
5086
|
+
multiplier_key:,
|
|
5087
|
+
# List price per unit, before the event's multiplier is applied.
|
|
5088
|
+
unit_amount:
|
|
5089
|
+
)
|
|
5090
|
+
end
|
|
5091
|
+
|
|
5092
|
+
sig do
|
|
5093
|
+
override.returns(
|
|
5094
|
+
{
|
|
5095
|
+
default_display_name: String,
|
|
5096
|
+
display_name_key: String,
|
|
5097
|
+
multiplier_key: String,
|
|
5098
|
+
unit_amount: String
|
|
5099
|
+
}
|
|
5100
|
+
)
|
|
5101
|
+
end
|
|
5102
|
+
def to_hash
|
|
5103
|
+
end
|
|
5104
|
+
end
|
|
5105
|
+
end
|
|
5106
|
+
|
|
4714
5107
|
sig do
|
|
4715
5108
|
override.returns(
|
|
4716
5109
|
T::Array[
|
|
@@ -124,7 +124,8 @@ module Orb
|
|
|
124
124
|
Orb::Price::MeteredAllowance::OrHash,
|
|
125
125
|
Orb::Price::MinimumComposite::OrHash,
|
|
126
126
|
Orb::Price::Percent::OrHash,
|
|
127
|
-
Orb::Price::EventOutput::OrHash
|
|
127
|
+
Orb::Price::EventOutput::OrHash,
|
|
128
|
+
Orb::Price::UnitWithMultiplier::OrHash
|
|
128
129
|
),
|
|
129
130
|
start_date: Time,
|
|
130
131
|
usage_customer_ids: T.nilable(T::Array[String]),
|