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
|
@@ -158,7 +158,8 @@ module Orb
|
|
|
158
158
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance,
|
|
159
159
|
Orb::NewFloatingMinimumCompositePrice,
|
|
160
160
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent,
|
|
161
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput
|
|
161
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput,
|
|
162
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::UnitWithMultiplier
|
|
162
163
|
)
|
|
163
164
|
)
|
|
164
165
|
)
|
|
@@ -213,7 +214,8 @@ module Orb
|
|
|
213
214
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::OrHash,
|
|
214
215
|
Orb::NewFloatingMinimumCompositePrice::OrHash,
|
|
215
216
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent::OrHash,
|
|
216
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput::OrHash
|
|
217
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput::OrHash,
|
|
218
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::UnitWithMultiplier::OrHash
|
|
217
219
|
)
|
|
218
220
|
),
|
|
219
221
|
price_id: T.nilable(String)
|
|
@@ -286,7 +288,8 @@ module Orb
|
|
|
286
288
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance,
|
|
287
289
|
Orb::NewFloatingMinimumCompositePrice,
|
|
288
290
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent,
|
|
289
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput
|
|
291
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput,
|
|
292
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::UnitWithMultiplier
|
|
290
293
|
)
|
|
291
294
|
),
|
|
292
295
|
price_id: T.nilable(String)
|
|
@@ -338,7 +341,8 @@ module Orb
|
|
|
338
341
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance,
|
|
339
342
|
Orb::NewFloatingMinimumCompositePrice,
|
|
340
343
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent,
|
|
341
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput
|
|
344
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput,
|
|
345
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::UnitWithMultiplier
|
|
342
346
|
)
|
|
343
347
|
end
|
|
344
348
|
|
|
@@ -4610,6 +4614,395 @@ module Orb
|
|
|
4610
4614
|
end
|
|
4611
4615
|
end
|
|
4612
4616
|
|
|
4617
|
+
class UnitWithMultiplier < Orb::Internal::Type::BaseModel
|
|
4618
|
+
OrHash =
|
|
4619
|
+
T.type_alias do
|
|
4620
|
+
T.any(
|
|
4621
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::UnitWithMultiplier,
|
|
4622
|
+
Orb::Internal::AnyHash
|
|
4623
|
+
)
|
|
4624
|
+
end
|
|
4625
|
+
|
|
4626
|
+
# The cadence to bill for this price on.
|
|
4627
|
+
sig do
|
|
4628
|
+
returns(
|
|
4629
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence::OrSymbol
|
|
4630
|
+
)
|
|
4631
|
+
end
|
|
4632
|
+
attr_accessor :cadence
|
|
4633
|
+
|
|
4634
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
4635
|
+
sig { returns(String) }
|
|
4636
|
+
attr_accessor :currency
|
|
4637
|
+
|
|
4638
|
+
# The id of the item the price will be associated with.
|
|
4639
|
+
sig { returns(String) }
|
|
4640
|
+
attr_accessor :item_id
|
|
4641
|
+
|
|
4642
|
+
# The pricing model type
|
|
4643
|
+
sig { returns(Symbol) }
|
|
4644
|
+
attr_accessor :model_type
|
|
4645
|
+
|
|
4646
|
+
# The name of the price.
|
|
4647
|
+
sig { returns(String) }
|
|
4648
|
+
attr_accessor :name
|
|
4649
|
+
|
|
4650
|
+
# Configuration for unit_with_multiplier pricing
|
|
4651
|
+
sig do
|
|
4652
|
+
returns(
|
|
4653
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::UnitWithMultiplier::UnitWithMultiplierConfig
|
|
4654
|
+
)
|
|
4655
|
+
end
|
|
4656
|
+
attr_reader :unit_with_multiplier_config
|
|
4657
|
+
|
|
4658
|
+
sig do
|
|
4659
|
+
params(
|
|
4660
|
+
unit_with_multiplier_config:
|
|
4661
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::UnitWithMultiplier::UnitWithMultiplierConfig::OrHash
|
|
4662
|
+
).void
|
|
4663
|
+
end
|
|
4664
|
+
attr_writer :unit_with_multiplier_config
|
|
4665
|
+
|
|
4666
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
4667
|
+
# usage-based.
|
|
4668
|
+
sig { returns(T.nilable(String)) }
|
|
4669
|
+
attr_accessor :billable_metric_id
|
|
4670
|
+
|
|
4671
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
4672
|
+
# this is true, and in-arrears if this is false.
|
|
4673
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
4674
|
+
attr_accessor :billed_in_advance
|
|
4675
|
+
|
|
4676
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
4677
|
+
# months.
|
|
4678
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
4679
|
+
attr_reader :billing_cycle_configuration
|
|
4680
|
+
|
|
4681
|
+
sig do
|
|
4682
|
+
params(
|
|
4683
|
+
billing_cycle_configuration:
|
|
4684
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
4685
|
+
).void
|
|
4686
|
+
end
|
|
4687
|
+
attr_writer :billing_cycle_configuration
|
|
4688
|
+
|
|
4689
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
4690
|
+
sig { returns(T.nilable(Float)) }
|
|
4691
|
+
attr_accessor :conversion_rate
|
|
4692
|
+
|
|
4693
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
4694
|
+
sig do
|
|
4695
|
+
returns(
|
|
4696
|
+
T.nilable(
|
|
4697
|
+
T.any(
|
|
4698
|
+
Orb::UnitConversionRateConfig,
|
|
4699
|
+
Orb::TieredConversionRateConfig
|
|
4700
|
+
)
|
|
4701
|
+
)
|
|
4702
|
+
)
|
|
4703
|
+
end
|
|
4704
|
+
attr_accessor :conversion_rate_config
|
|
4705
|
+
|
|
4706
|
+
# For dimensional price: specifies a price group and dimension values
|
|
4707
|
+
sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
|
|
4708
|
+
attr_reader :dimensional_price_configuration
|
|
4709
|
+
|
|
4710
|
+
sig do
|
|
4711
|
+
params(
|
|
4712
|
+
dimensional_price_configuration:
|
|
4713
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
|
|
4714
|
+
).void
|
|
4715
|
+
end
|
|
4716
|
+
attr_writer :dimensional_price_configuration
|
|
4717
|
+
|
|
4718
|
+
# An alias for the price.
|
|
4719
|
+
sig { returns(T.nilable(String)) }
|
|
4720
|
+
attr_accessor :external_price_id
|
|
4721
|
+
|
|
4722
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
4723
|
+
# applied.
|
|
4724
|
+
sig { returns(T.nilable(Float)) }
|
|
4725
|
+
attr_accessor :fixed_price_quantity
|
|
4726
|
+
|
|
4727
|
+
# The property used to group this price on an invoice
|
|
4728
|
+
sig { returns(T.nilable(String)) }
|
|
4729
|
+
attr_accessor :invoice_grouping_key
|
|
4730
|
+
|
|
4731
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
4732
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
4733
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
4734
|
+
attr_reader :invoicing_cycle_configuration
|
|
4735
|
+
|
|
4736
|
+
sig do
|
|
4737
|
+
params(
|
|
4738
|
+
invoicing_cycle_configuration:
|
|
4739
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
4740
|
+
).void
|
|
4741
|
+
end
|
|
4742
|
+
attr_writer :invoicing_cycle_configuration
|
|
4743
|
+
|
|
4744
|
+
# The ID of the license type to associate with this price. On a usage price this
|
|
4745
|
+
# also marks the price as eligible to draw down from that license type's
|
|
4746
|
+
# allocation; a usage price created without it is billed normally. Usage prices
|
|
4747
|
+
# with a license type must use the `unit` model, and only draw down when their
|
|
4748
|
+
# currency matches the allocation's.
|
|
4749
|
+
sig { returns(T.nilable(String)) }
|
|
4750
|
+
attr_accessor :license_type_id
|
|
4751
|
+
|
|
4752
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
4753
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
4754
|
+
# by setting `metadata` to `null`.
|
|
4755
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
4756
|
+
attr_accessor :metadata
|
|
4757
|
+
|
|
4758
|
+
sig do
|
|
4759
|
+
params(
|
|
4760
|
+
cadence:
|
|
4761
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence::OrSymbol,
|
|
4762
|
+
currency: String,
|
|
4763
|
+
item_id: String,
|
|
4764
|
+
name: String,
|
|
4765
|
+
unit_with_multiplier_config:
|
|
4766
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::UnitWithMultiplier::UnitWithMultiplierConfig::OrHash,
|
|
4767
|
+
billable_metric_id: T.nilable(String),
|
|
4768
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
4769
|
+
billing_cycle_configuration:
|
|
4770
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
4771
|
+
conversion_rate: T.nilable(Float),
|
|
4772
|
+
conversion_rate_config:
|
|
4773
|
+
T.nilable(
|
|
4774
|
+
T.any(
|
|
4775
|
+
Orb::UnitConversionRateConfig::OrHash,
|
|
4776
|
+
Orb::TieredConversionRateConfig::OrHash
|
|
4777
|
+
)
|
|
4778
|
+
),
|
|
4779
|
+
dimensional_price_configuration:
|
|
4780
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
|
|
4781
|
+
external_price_id: T.nilable(String),
|
|
4782
|
+
fixed_price_quantity: T.nilable(Float),
|
|
4783
|
+
invoice_grouping_key: T.nilable(String),
|
|
4784
|
+
invoicing_cycle_configuration:
|
|
4785
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
4786
|
+
license_type_id: T.nilable(String),
|
|
4787
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
4788
|
+
model_type: Symbol
|
|
4789
|
+
).returns(T.attached_class)
|
|
4790
|
+
end
|
|
4791
|
+
def self.new(
|
|
4792
|
+
# The cadence to bill for this price on.
|
|
4793
|
+
cadence:,
|
|
4794
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
4795
|
+
currency:,
|
|
4796
|
+
# The id of the item the price will be associated with.
|
|
4797
|
+
item_id:,
|
|
4798
|
+
# The name of the price.
|
|
4799
|
+
name:,
|
|
4800
|
+
# Configuration for unit_with_multiplier pricing
|
|
4801
|
+
unit_with_multiplier_config:,
|
|
4802
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
4803
|
+
# usage-based.
|
|
4804
|
+
billable_metric_id: nil,
|
|
4805
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
4806
|
+
# this is true, and in-arrears if this is false.
|
|
4807
|
+
billed_in_advance: nil,
|
|
4808
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
4809
|
+
# months.
|
|
4810
|
+
billing_cycle_configuration: nil,
|
|
4811
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
4812
|
+
conversion_rate: nil,
|
|
4813
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
4814
|
+
conversion_rate_config: nil,
|
|
4815
|
+
# For dimensional price: specifies a price group and dimension values
|
|
4816
|
+
dimensional_price_configuration: nil,
|
|
4817
|
+
# An alias for the price.
|
|
4818
|
+
external_price_id: nil,
|
|
4819
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
4820
|
+
# applied.
|
|
4821
|
+
fixed_price_quantity: nil,
|
|
4822
|
+
# The property used to group this price on an invoice
|
|
4823
|
+
invoice_grouping_key: nil,
|
|
4824
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
4825
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
4826
|
+
invoicing_cycle_configuration: nil,
|
|
4827
|
+
# The ID of the license type to associate with this price. On a usage price this
|
|
4828
|
+
# also marks the price as eligible to draw down from that license type's
|
|
4829
|
+
# allocation; a usage price created without it is billed normally. Usage prices
|
|
4830
|
+
# with a license type must use the `unit` model, and only draw down when their
|
|
4831
|
+
# currency matches the allocation's.
|
|
4832
|
+
license_type_id: nil,
|
|
4833
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
4834
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
4835
|
+
# by setting `metadata` to `null`.
|
|
4836
|
+
metadata: nil,
|
|
4837
|
+
# The pricing model type
|
|
4838
|
+
model_type: :unit_with_multiplier
|
|
4839
|
+
)
|
|
4840
|
+
end
|
|
4841
|
+
|
|
4842
|
+
sig do
|
|
4843
|
+
override.returns(
|
|
4844
|
+
{
|
|
4845
|
+
cadence:
|
|
4846
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence::OrSymbol,
|
|
4847
|
+
currency: String,
|
|
4848
|
+
item_id: String,
|
|
4849
|
+
model_type: Symbol,
|
|
4850
|
+
name: String,
|
|
4851
|
+
unit_with_multiplier_config:
|
|
4852
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::UnitWithMultiplier::UnitWithMultiplierConfig,
|
|
4853
|
+
billable_metric_id: T.nilable(String),
|
|
4854
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
4855
|
+
billing_cycle_configuration:
|
|
4856
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
4857
|
+
conversion_rate: T.nilable(Float),
|
|
4858
|
+
conversion_rate_config:
|
|
4859
|
+
T.nilable(
|
|
4860
|
+
T.any(
|
|
4861
|
+
Orb::UnitConversionRateConfig,
|
|
4862
|
+
Orb::TieredConversionRateConfig
|
|
4863
|
+
)
|
|
4864
|
+
),
|
|
4865
|
+
dimensional_price_configuration:
|
|
4866
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration),
|
|
4867
|
+
external_price_id: T.nilable(String),
|
|
4868
|
+
fixed_price_quantity: T.nilable(Float),
|
|
4869
|
+
invoice_grouping_key: T.nilable(String),
|
|
4870
|
+
invoicing_cycle_configuration:
|
|
4871
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
4872
|
+
license_type_id: T.nilable(String),
|
|
4873
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)])
|
|
4874
|
+
}
|
|
4875
|
+
)
|
|
4876
|
+
end
|
|
4877
|
+
def to_hash
|
|
4878
|
+
end
|
|
4879
|
+
|
|
4880
|
+
# The cadence to bill for this price on.
|
|
4881
|
+
module Cadence
|
|
4882
|
+
extend Orb::Internal::Type::Enum
|
|
4883
|
+
|
|
4884
|
+
TaggedSymbol =
|
|
4885
|
+
T.type_alias do
|
|
4886
|
+
T.all(
|
|
4887
|
+
Symbol,
|
|
4888
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence
|
|
4889
|
+
)
|
|
4890
|
+
end
|
|
4891
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
4892
|
+
|
|
4893
|
+
ONE_TIME =
|
|
4894
|
+
T.let(
|
|
4895
|
+
:one_time,
|
|
4896
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence::TaggedSymbol
|
|
4897
|
+
)
|
|
4898
|
+
MONTHLY =
|
|
4899
|
+
T.let(
|
|
4900
|
+
:monthly,
|
|
4901
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence::TaggedSymbol
|
|
4902
|
+
)
|
|
4903
|
+
QUARTERLY =
|
|
4904
|
+
T.let(
|
|
4905
|
+
:quarterly,
|
|
4906
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence::TaggedSymbol
|
|
4907
|
+
)
|
|
4908
|
+
SEMI_ANNUAL =
|
|
4909
|
+
T.let(
|
|
4910
|
+
:semi_annual,
|
|
4911
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence::TaggedSymbol
|
|
4912
|
+
)
|
|
4913
|
+
ANNUAL =
|
|
4914
|
+
T.let(
|
|
4915
|
+
:annual,
|
|
4916
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence::TaggedSymbol
|
|
4917
|
+
)
|
|
4918
|
+
CUSTOM =
|
|
4919
|
+
T.let(
|
|
4920
|
+
:custom,
|
|
4921
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence::TaggedSymbol
|
|
4922
|
+
)
|
|
4923
|
+
|
|
4924
|
+
sig do
|
|
4925
|
+
override.returns(
|
|
4926
|
+
T::Array[
|
|
4927
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::UnitWithMultiplier::Cadence::TaggedSymbol
|
|
4928
|
+
]
|
|
4929
|
+
)
|
|
4930
|
+
end
|
|
4931
|
+
def self.values
|
|
4932
|
+
end
|
|
4933
|
+
end
|
|
4934
|
+
|
|
4935
|
+
class UnitWithMultiplierConfig < Orb::Internal::Type::BaseModel
|
|
4936
|
+
OrHash =
|
|
4937
|
+
T.type_alias do
|
|
4938
|
+
T.any(
|
|
4939
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::UnitWithMultiplier::UnitWithMultiplierConfig,
|
|
4940
|
+
Orb::Internal::AnyHash
|
|
4941
|
+
)
|
|
4942
|
+
end
|
|
4943
|
+
|
|
4944
|
+
# Sub-line label for list-price events that don't set display_name_key. Unlabeled
|
|
4945
|
+
# events with another multiplier are labeled by their multiplier (e.g. '0.8×
|
|
4946
|
+
# rate').
|
|
4947
|
+
sig { returns(String) }
|
|
4948
|
+
attr_accessor :default_display_name
|
|
4949
|
+
|
|
4950
|
+
# Event property holding the sub-line label for the event's rate (e.g.
|
|
4951
|
+
# 'Off-peak').
|
|
4952
|
+
sig { returns(String) }
|
|
4953
|
+
attr_accessor :display_name_key
|
|
4954
|
+
|
|
4955
|
+
# Event property holding the multiplier applied to unit_amount (e.g. 0.8 for a 20%
|
|
4956
|
+
# discount). Events without a number between 0 and 1000 with at most 12 decimal
|
|
4957
|
+
# places are charged at unit_amount.
|
|
4958
|
+
sig { returns(String) }
|
|
4959
|
+
attr_accessor :multiplier_key
|
|
4960
|
+
|
|
4961
|
+
# List price per unit, before the event's multiplier is applied.
|
|
4962
|
+
sig { returns(String) }
|
|
4963
|
+
attr_accessor :unit_amount
|
|
4964
|
+
|
|
4965
|
+
# Configuration for unit_with_multiplier pricing
|
|
4966
|
+
sig do
|
|
4967
|
+
params(
|
|
4968
|
+
default_display_name: String,
|
|
4969
|
+
display_name_key: String,
|
|
4970
|
+
multiplier_key: String,
|
|
4971
|
+
unit_amount: String
|
|
4972
|
+
).returns(T.attached_class)
|
|
4973
|
+
end
|
|
4974
|
+
def self.new(
|
|
4975
|
+
# Sub-line label for list-price events that don't set display_name_key. Unlabeled
|
|
4976
|
+
# events with another multiplier are labeled by their multiplier (e.g. '0.8×
|
|
4977
|
+
# rate').
|
|
4978
|
+
default_display_name:,
|
|
4979
|
+
# Event property holding the sub-line label for the event's rate (e.g.
|
|
4980
|
+
# 'Off-peak').
|
|
4981
|
+
display_name_key:,
|
|
4982
|
+
# Event property holding the multiplier applied to unit_amount (e.g. 0.8 for a 20%
|
|
4983
|
+
# discount). Events without a number between 0 and 1000 with at most 12 decimal
|
|
4984
|
+
# places are charged at unit_amount.
|
|
4985
|
+
multiplier_key:,
|
|
4986
|
+
# List price per unit, before the event's multiplier is applied.
|
|
4987
|
+
unit_amount:
|
|
4988
|
+
)
|
|
4989
|
+
end
|
|
4990
|
+
|
|
4991
|
+
sig do
|
|
4992
|
+
override.returns(
|
|
4993
|
+
{
|
|
4994
|
+
default_display_name: String,
|
|
4995
|
+
display_name_key: String,
|
|
4996
|
+
multiplier_key: String,
|
|
4997
|
+
unit_amount: String
|
|
4998
|
+
}
|
|
4999
|
+
)
|
|
5000
|
+
end
|
|
5001
|
+
def to_hash
|
|
5002
|
+
end
|
|
5003
|
+
end
|
|
5004
|
+
end
|
|
5005
|
+
|
|
4613
5006
|
sig do
|
|
4614
5007
|
override.returns(
|
|
4615
5008
|
T::Array[
|