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
data/rbi/orb/models/price.rbi
CHANGED
|
@@ -53,7 +53,8 @@ module Orb
|
|
|
53
53
|
Orb::Price::MeteredAllowance,
|
|
54
54
|
Orb::Price::MinimumComposite,
|
|
55
55
|
Orb::Price::Percent,
|
|
56
|
-
Orb::Price::EventOutput
|
|
56
|
+
Orb::Price::EventOutput,
|
|
57
|
+
Orb::Price::UnitWithMultiplier
|
|
57
58
|
)
|
|
58
59
|
end
|
|
59
60
|
|
|
@@ -25844,6 +25845,720 @@ module Orb
|
|
|
25844
25845
|
end
|
|
25845
25846
|
end
|
|
25846
25847
|
|
|
25848
|
+
class UnitWithMultiplier < Orb::Internal::Type::BaseModel
|
|
25849
|
+
OrHash =
|
|
25850
|
+
T.type_alias do
|
|
25851
|
+
T.any(Orb::Price::UnitWithMultiplier, Orb::Internal::AnyHash)
|
|
25852
|
+
end
|
|
25853
|
+
|
|
25854
|
+
sig { returns(String) }
|
|
25855
|
+
attr_accessor :id
|
|
25856
|
+
|
|
25857
|
+
sig { returns(T.nilable(Orb::BillableMetricTiny)) }
|
|
25858
|
+
attr_reader :billable_metric
|
|
25859
|
+
|
|
25860
|
+
sig do
|
|
25861
|
+
params(
|
|
25862
|
+
billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash)
|
|
25863
|
+
).void
|
|
25864
|
+
end
|
|
25865
|
+
attr_writer :billable_metric
|
|
25866
|
+
|
|
25867
|
+
sig { returns(Orb::BillingCycleConfiguration) }
|
|
25868
|
+
attr_reader :billing_cycle_configuration
|
|
25869
|
+
|
|
25870
|
+
sig do
|
|
25871
|
+
params(
|
|
25872
|
+
billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash
|
|
25873
|
+
).void
|
|
25874
|
+
end
|
|
25875
|
+
attr_writer :billing_cycle_configuration
|
|
25876
|
+
|
|
25877
|
+
sig do
|
|
25878
|
+
returns(Orb::Price::UnitWithMultiplier::BillingMode::TaggedSymbol)
|
|
25879
|
+
end
|
|
25880
|
+
attr_accessor :billing_mode
|
|
25881
|
+
|
|
25882
|
+
sig { returns(Orb::Price::UnitWithMultiplier::Cadence::TaggedSymbol) }
|
|
25883
|
+
attr_accessor :cadence
|
|
25884
|
+
|
|
25885
|
+
sig do
|
|
25886
|
+
returns(
|
|
25887
|
+
T.nilable(
|
|
25888
|
+
T::Array[Orb::Price::UnitWithMultiplier::CompositePriceFilter]
|
|
25889
|
+
)
|
|
25890
|
+
)
|
|
25891
|
+
end
|
|
25892
|
+
attr_accessor :composite_price_filters
|
|
25893
|
+
|
|
25894
|
+
sig { returns(T.nilable(Float)) }
|
|
25895
|
+
attr_accessor :conversion_rate
|
|
25896
|
+
|
|
25897
|
+
sig { returns(T.nilable(Orb::ConversionRateConfig::Variants)) }
|
|
25898
|
+
attr_accessor :conversion_rate_config
|
|
25899
|
+
|
|
25900
|
+
sig { returns(Time) }
|
|
25901
|
+
attr_accessor :created_at
|
|
25902
|
+
|
|
25903
|
+
sig { returns(T.nilable(Orb::Allocation)) }
|
|
25904
|
+
attr_reader :credit_allocation
|
|
25905
|
+
|
|
25906
|
+
sig do
|
|
25907
|
+
params(credit_allocation: T.nilable(Orb::Allocation::OrHash)).void
|
|
25908
|
+
end
|
|
25909
|
+
attr_writer :credit_allocation
|
|
25910
|
+
|
|
25911
|
+
sig { returns(String) }
|
|
25912
|
+
attr_accessor :currency
|
|
25913
|
+
|
|
25914
|
+
sig { returns(T.nilable(Orb::Discount::Variants)) }
|
|
25915
|
+
attr_accessor :discount
|
|
25916
|
+
|
|
25917
|
+
sig { returns(T.nilable(String)) }
|
|
25918
|
+
attr_accessor :external_price_id
|
|
25919
|
+
|
|
25920
|
+
sig { returns(T.nilable(Float)) }
|
|
25921
|
+
attr_accessor :fixed_price_quantity
|
|
25922
|
+
|
|
25923
|
+
sig { returns(T.nilable(String)) }
|
|
25924
|
+
attr_accessor :invoice_grouping_key
|
|
25925
|
+
|
|
25926
|
+
sig { returns(T.nilable(Orb::BillingCycleConfiguration)) }
|
|
25927
|
+
attr_reader :invoicing_cycle_configuration
|
|
25928
|
+
|
|
25929
|
+
sig do
|
|
25930
|
+
params(
|
|
25931
|
+
invoicing_cycle_configuration:
|
|
25932
|
+
T.nilable(Orb::BillingCycleConfiguration::OrHash)
|
|
25933
|
+
).void
|
|
25934
|
+
end
|
|
25935
|
+
attr_writer :invoicing_cycle_configuration
|
|
25936
|
+
|
|
25937
|
+
# A minimal representation of an Item containing only the essential identifying
|
|
25938
|
+
# information.
|
|
25939
|
+
sig { returns(Orb::ItemSlim) }
|
|
25940
|
+
attr_reader :item
|
|
25941
|
+
|
|
25942
|
+
sig { params(item: Orb::ItemSlim::OrHash).void }
|
|
25943
|
+
attr_writer :item
|
|
25944
|
+
|
|
25945
|
+
sig { returns(T.nilable(Orb::Maximum)) }
|
|
25946
|
+
attr_reader :maximum
|
|
25947
|
+
|
|
25948
|
+
sig { params(maximum: T.nilable(Orb::Maximum::OrHash)).void }
|
|
25949
|
+
attr_writer :maximum
|
|
25950
|
+
|
|
25951
|
+
sig { returns(T.nilable(String)) }
|
|
25952
|
+
attr_accessor :maximum_amount
|
|
25953
|
+
|
|
25954
|
+
# User specified key-value pairs for the resource. If not present, this defaults
|
|
25955
|
+
# to an empty dictionary. Individual keys can be removed by setting the value to
|
|
25956
|
+
# `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
25957
|
+
# `null`.
|
|
25958
|
+
sig { returns(T::Hash[Symbol, String]) }
|
|
25959
|
+
attr_accessor :metadata
|
|
25960
|
+
|
|
25961
|
+
sig { returns(T.nilable(Orb::Minimum)) }
|
|
25962
|
+
attr_reader :minimum
|
|
25963
|
+
|
|
25964
|
+
sig { params(minimum: T.nilable(Orb::Minimum::OrHash)).void }
|
|
25965
|
+
attr_writer :minimum
|
|
25966
|
+
|
|
25967
|
+
sig { returns(T.nilable(String)) }
|
|
25968
|
+
attr_accessor :minimum_amount
|
|
25969
|
+
|
|
25970
|
+
# The pricing model type
|
|
25971
|
+
sig { returns(Symbol) }
|
|
25972
|
+
attr_accessor :model_type
|
|
25973
|
+
|
|
25974
|
+
sig { returns(String) }
|
|
25975
|
+
attr_accessor :name
|
|
25976
|
+
|
|
25977
|
+
sig { returns(T.nilable(Integer)) }
|
|
25978
|
+
attr_accessor :plan_phase_order
|
|
25979
|
+
|
|
25980
|
+
sig { returns(Orb::Price::UnitWithMultiplier::PriceType::TaggedSymbol) }
|
|
25981
|
+
attr_accessor :price_type
|
|
25982
|
+
|
|
25983
|
+
# The price id this price replaces. This price will take the place of the replaced
|
|
25984
|
+
# price in plan version migrations.
|
|
25985
|
+
sig { returns(T.nilable(String)) }
|
|
25986
|
+
attr_accessor :replaces_price_id
|
|
25987
|
+
|
|
25988
|
+
# Configuration for unit_with_multiplier pricing
|
|
25989
|
+
sig do
|
|
25990
|
+
returns(Orb::Price::UnitWithMultiplier::UnitWithMultiplierConfig)
|
|
25991
|
+
end
|
|
25992
|
+
attr_reader :unit_with_multiplier_config
|
|
25993
|
+
|
|
25994
|
+
sig do
|
|
25995
|
+
params(
|
|
25996
|
+
unit_with_multiplier_config:
|
|
25997
|
+
Orb::Price::UnitWithMultiplier::UnitWithMultiplierConfig::OrHash
|
|
25998
|
+
).void
|
|
25999
|
+
end
|
|
26000
|
+
attr_writer :unit_with_multiplier_config
|
|
26001
|
+
|
|
26002
|
+
sig { returns(T.nilable(Orb::DimensionalPriceConfiguration)) }
|
|
26003
|
+
attr_reader :dimensional_price_configuration
|
|
26004
|
+
|
|
26005
|
+
sig do
|
|
26006
|
+
params(
|
|
26007
|
+
dimensional_price_configuration:
|
|
26008
|
+
T.nilable(Orb::DimensionalPriceConfiguration::OrHash)
|
|
26009
|
+
).void
|
|
26010
|
+
end
|
|
26011
|
+
attr_writer :dimensional_price_configuration
|
|
26012
|
+
|
|
26013
|
+
# The LicenseType resource represents a type of license that can be assigned to
|
|
26014
|
+
# users. License types are used during billing by grouping metrics on the
|
|
26015
|
+
# configured grouping key.
|
|
26016
|
+
sig { returns(T.nilable(Orb::Price::UnitWithMultiplier::LicenseType)) }
|
|
26017
|
+
attr_reader :license_type
|
|
26018
|
+
|
|
26019
|
+
sig do
|
|
26020
|
+
params(
|
|
26021
|
+
license_type:
|
|
26022
|
+
T.nilable(Orb::Price::UnitWithMultiplier::LicenseType::OrHash)
|
|
26023
|
+
).void
|
|
26024
|
+
end
|
|
26025
|
+
attr_writer :license_type
|
|
26026
|
+
|
|
26027
|
+
sig do
|
|
26028
|
+
params(
|
|
26029
|
+
id: String,
|
|
26030
|
+
billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash),
|
|
26031
|
+
billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash,
|
|
26032
|
+
billing_mode: Orb::Price::UnitWithMultiplier::BillingMode::OrSymbol,
|
|
26033
|
+
cadence: Orb::Price::UnitWithMultiplier::Cadence::OrSymbol,
|
|
26034
|
+
composite_price_filters:
|
|
26035
|
+
T.nilable(
|
|
26036
|
+
T::Array[
|
|
26037
|
+
Orb::Price::UnitWithMultiplier::CompositePriceFilter::OrHash
|
|
26038
|
+
]
|
|
26039
|
+
),
|
|
26040
|
+
conversion_rate: T.nilable(Float),
|
|
26041
|
+
conversion_rate_config:
|
|
26042
|
+
T.nilable(
|
|
26043
|
+
T.any(
|
|
26044
|
+
Orb::UnitConversionRateConfig::OrHash,
|
|
26045
|
+
Orb::TieredConversionRateConfig::OrHash
|
|
26046
|
+
)
|
|
26047
|
+
),
|
|
26048
|
+
created_at: Time,
|
|
26049
|
+
credit_allocation: T.nilable(Orb::Allocation::OrHash),
|
|
26050
|
+
currency: String,
|
|
26051
|
+
discount:
|
|
26052
|
+
T.nilable(
|
|
26053
|
+
T.any(
|
|
26054
|
+
Orb::PercentageDiscount::OrHash,
|
|
26055
|
+
Orb::TrialDiscount::OrHash,
|
|
26056
|
+
Orb::UsageDiscount::OrHash,
|
|
26057
|
+
Orb::AmountDiscount::OrHash,
|
|
26058
|
+
Orb::Discount::TieredPercentage::OrHash
|
|
26059
|
+
)
|
|
26060
|
+
),
|
|
26061
|
+
external_price_id: T.nilable(String),
|
|
26062
|
+
fixed_price_quantity: T.nilable(Float),
|
|
26063
|
+
invoice_grouping_key: T.nilable(String),
|
|
26064
|
+
invoicing_cycle_configuration:
|
|
26065
|
+
T.nilable(Orb::BillingCycleConfiguration::OrHash),
|
|
26066
|
+
item: Orb::ItemSlim::OrHash,
|
|
26067
|
+
maximum: T.nilable(Orb::Maximum::OrHash),
|
|
26068
|
+
maximum_amount: T.nilable(String),
|
|
26069
|
+
metadata: T::Hash[Symbol, String],
|
|
26070
|
+
minimum: T.nilable(Orb::Minimum::OrHash),
|
|
26071
|
+
minimum_amount: T.nilable(String),
|
|
26072
|
+
name: String,
|
|
26073
|
+
plan_phase_order: T.nilable(Integer),
|
|
26074
|
+
price_type: Orb::Price::UnitWithMultiplier::PriceType::OrSymbol,
|
|
26075
|
+
replaces_price_id: T.nilable(String),
|
|
26076
|
+
unit_with_multiplier_config:
|
|
26077
|
+
Orb::Price::UnitWithMultiplier::UnitWithMultiplierConfig::OrHash,
|
|
26078
|
+
dimensional_price_configuration:
|
|
26079
|
+
T.nilable(Orb::DimensionalPriceConfiguration::OrHash),
|
|
26080
|
+
license_type:
|
|
26081
|
+
T.nilable(Orb::Price::UnitWithMultiplier::LicenseType::OrHash),
|
|
26082
|
+
model_type: Symbol
|
|
26083
|
+
).returns(T.attached_class)
|
|
26084
|
+
end
|
|
26085
|
+
def self.new(
|
|
26086
|
+
id:,
|
|
26087
|
+
billable_metric:,
|
|
26088
|
+
billing_cycle_configuration:,
|
|
26089
|
+
billing_mode:,
|
|
26090
|
+
cadence:,
|
|
26091
|
+
composite_price_filters:,
|
|
26092
|
+
conversion_rate:,
|
|
26093
|
+
conversion_rate_config:,
|
|
26094
|
+
created_at:,
|
|
26095
|
+
credit_allocation:,
|
|
26096
|
+
currency:,
|
|
26097
|
+
discount:,
|
|
26098
|
+
external_price_id:,
|
|
26099
|
+
fixed_price_quantity:,
|
|
26100
|
+
invoice_grouping_key:,
|
|
26101
|
+
invoicing_cycle_configuration:,
|
|
26102
|
+
# A minimal representation of an Item containing only the essential identifying
|
|
26103
|
+
# information.
|
|
26104
|
+
item:,
|
|
26105
|
+
maximum:,
|
|
26106
|
+
maximum_amount:,
|
|
26107
|
+
# User specified key-value pairs for the resource. If not present, this defaults
|
|
26108
|
+
# to an empty dictionary. Individual keys can be removed by setting the value to
|
|
26109
|
+
# `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
26110
|
+
# `null`.
|
|
26111
|
+
metadata:,
|
|
26112
|
+
minimum:,
|
|
26113
|
+
minimum_amount:,
|
|
26114
|
+
name:,
|
|
26115
|
+
plan_phase_order:,
|
|
26116
|
+
price_type:,
|
|
26117
|
+
# The price id this price replaces. This price will take the place of the replaced
|
|
26118
|
+
# price in plan version migrations.
|
|
26119
|
+
replaces_price_id:,
|
|
26120
|
+
# Configuration for unit_with_multiplier pricing
|
|
26121
|
+
unit_with_multiplier_config:,
|
|
26122
|
+
dimensional_price_configuration: nil,
|
|
26123
|
+
# The LicenseType resource represents a type of license that can be assigned to
|
|
26124
|
+
# users. License types are used during billing by grouping metrics on the
|
|
26125
|
+
# configured grouping key.
|
|
26126
|
+
license_type: nil,
|
|
26127
|
+
# The pricing model type
|
|
26128
|
+
model_type: :unit_with_multiplier
|
|
26129
|
+
)
|
|
26130
|
+
end
|
|
26131
|
+
|
|
26132
|
+
sig do
|
|
26133
|
+
override.returns(
|
|
26134
|
+
{
|
|
26135
|
+
id: String,
|
|
26136
|
+
billable_metric: T.nilable(Orb::BillableMetricTiny),
|
|
26137
|
+
billing_cycle_configuration: Orb::BillingCycleConfiguration,
|
|
26138
|
+
billing_mode:
|
|
26139
|
+
Orb::Price::UnitWithMultiplier::BillingMode::TaggedSymbol,
|
|
26140
|
+
cadence: Orb::Price::UnitWithMultiplier::Cadence::TaggedSymbol,
|
|
26141
|
+
composite_price_filters:
|
|
26142
|
+
T.nilable(
|
|
26143
|
+
T::Array[Orb::Price::UnitWithMultiplier::CompositePriceFilter]
|
|
26144
|
+
),
|
|
26145
|
+
conversion_rate: T.nilable(Float),
|
|
26146
|
+
conversion_rate_config:
|
|
26147
|
+
T.nilable(Orb::ConversionRateConfig::Variants),
|
|
26148
|
+
created_at: Time,
|
|
26149
|
+
credit_allocation: T.nilable(Orb::Allocation),
|
|
26150
|
+
currency: String,
|
|
26151
|
+
discount: T.nilable(Orb::Discount::Variants),
|
|
26152
|
+
external_price_id: T.nilable(String),
|
|
26153
|
+
fixed_price_quantity: T.nilable(Float),
|
|
26154
|
+
invoice_grouping_key: T.nilable(String),
|
|
26155
|
+
invoicing_cycle_configuration:
|
|
26156
|
+
T.nilable(Orb::BillingCycleConfiguration),
|
|
26157
|
+
item: Orb::ItemSlim,
|
|
26158
|
+
maximum: T.nilable(Orb::Maximum),
|
|
26159
|
+
maximum_amount: T.nilable(String),
|
|
26160
|
+
metadata: T::Hash[Symbol, String],
|
|
26161
|
+
minimum: T.nilable(Orb::Minimum),
|
|
26162
|
+
minimum_amount: T.nilable(String),
|
|
26163
|
+
model_type: Symbol,
|
|
26164
|
+
name: String,
|
|
26165
|
+
plan_phase_order: T.nilable(Integer),
|
|
26166
|
+
price_type:
|
|
26167
|
+
Orb::Price::UnitWithMultiplier::PriceType::TaggedSymbol,
|
|
26168
|
+
replaces_price_id: T.nilable(String),
|
|
26169
|
+
unit_with_multiplier_config:
|
|
26170
|
+
Orb::Price::UnitWithMultiplier::UnitWithMultiplierConfig,
|
|
26171
|
+
dimensional_price_configuration:
|
|
26172
|
+
T.nilable(Orb::DimensionalPriceConfiguration),
|
|
26173
|
+
license_type:
|
|
26174
|
+
T.nilable(Orb::Price::UnitWithMultiplier::LicenseType)
|
|
26175
|
+
}
|
|
26176
|
+
)
|
|
26177
|
+
end
|
|
26178
|
+
def to_hash
|
|
26179
|
+
end
|
|
26180
|
+
|
|
26181
|
+
module BillingMode
|
|
26182
|
+
extend Orb::Internal::Type::Enum
|
|
26183
|
+
|
|
26184
|
+
TaggedSymbol =
|
|
26185
|
+
T.type_alias do
|
|
26186
|
+
T.all(Symbol, Orb::Price::UnitWithMultiplier::BillingMode)
|
|
26187
|
+
end
|
|
26188
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
26189
|
+
|
|
26190
|
+
IN_ADVANCE =
|
|
26191
|
+
T.let(
|
|
26192
|
+
:in_advance,
|
|
26193
|
+
Orb::Price::UnitWithMultiplier::BillingMode::TaggedSymbol
|
|
26194
|
+
)
|
|
26195
|
+
IN_ARREAR =
|
|
26196
|
+
T.let(
|
|
26197
|
+
:in_arrear,
|
|
26198
|
+
Orb::Price::UnitWithMultiplier::BillingMode::TaggedSymbol
|
|
26199
|
+
)
|
|
26200
|
+
|
|
26201
|
+
sig do
|
|
26202
|
+
override.returns(
|
|
26203
|
+
T::Array[
|
|
26204
|
+
Orb::Price::UnitWithMultiplier::BillingMode::TaggedSymbol
|
|
26205
|
+
]
|
|
26206
|
+
)
|
|
26207
|
+
end
|
|
26208
|
+
def self.values
|
|
26209
|
+
end
|
|
26210
|
+
end
|
|
26211
|
+
|
|
26212
|
+
module Cadence
|
|
26213
|
+
extend Orb::Internal::Type::Enum
|
|
26214
|
+
|
|
26215
|
+
TaggedSymbol =
|
|
26216
|
+
T.type_alias do
|
|
26217
|
+
T.all(Symbol, Orb::Price::UnitWithMultiplier::Cadence)
|
|
26218
|
+
end
|
|
26219
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
26220
|
+
|
|
26221
|
+
ONE_TIME =
|
|
26222
|
+
T.let(
|
|
26223
|
+
:one_time,
|
|
26224
|
+
Orb::Price::UnitWithMultiplier::Cadence::TaggedSymbol
|
|
26225
|
+
)
|
|
26226
|
+
MONTHLY =
|
|
26227
|
+
T.let(
|
|
26228
|
+
:monthly,
|
|
26229
|
+
Orb::Price::UnitWithMultiplier::Cadence::TaggedSymbol
|
|
26230
|
+
)
|
|
26231
|
+
QUARTERLY =
|
|
26232
|
+
T.let(
|
|
26233
|
+
:quarterly,
|
|
26234
|
+
Orb::Price::UnitWithMultiplier::Cadence::TaggedSymbol
|
|
26235
|
+
)
|
|
26236
|
+
SEMI_ANNUAL =
|
|
26237
|
+
T.let(
|
|
26238
|
+
:semi_annual,
|
|
26239
|
+
Orb::Price::UnitWithMultiplier::Cadence::TaggedSymbol
|
|
26240
|
+
)
|
|
26241
|
+
ANNUAL =
|
|
26242
|
+
T.let(
|
|
26243
|
+
:annual,
|
|
26244
|
+
Orb::Price::UnitWithMultiplier::Cadence::TaggedSymbol
|
|
26245
|
+
)
|
|
26246
|
+
CUSTOM =
|
|
26247
|
+
T.let(
|
|
26248
|
+
:custom,
|
|
26249
|
+
Orb::Price::UnitWithMultiplier::Cadence::TaggedSymbol
|
|
26250
|
+
)
|
|
26251
|
+
|
|
26252
|
+
sig do
|
|
26253
|
+
override.returns(
|
|
26254
|
+
T::Array[Orb::Price::UnitWithMultiplier::Cadence::TaggedSymbol]
|
|
26255
|
+
)
|
|
26256
|
+
end
|
|
26257
|
+
def self.values
|
|
26258
|
+
end
|
|
26259
|
+
end
|
|
26260
|
+
|
|
26261
|
+
class CompositePriceFilter < Orb::Internal::Type::BaseModel
|
|
26262
|
+
OrHash =
|
|
26263
|
+
T.type_alias do
|
|
26264
|
+
T.any(
|
|
26265
|
+
Orb::Price::UnitWithMultiplier::CompositePriceFilter,
|
|
26266
|
+
Orb::Internal::AnyHash
|
|
26267
|
+
)
|
|
26268
|
+
end
|
|
26269
|
+
|
|
26270
|
+
# The property of the price to filter on.
|
|
26271
|
+
sig do
|
|
26272
|
+
returns(
|
|
26273
|
+
Orb::Price::UnitWithMultiplier::CompositePriceFilter::Field::TaggedSymbol
|
|
26274
|
+
)
|
|
26275
|
+
end
|
|
26276
|
+
attr_accessor :field
|
|
26277
|
+
|
|
26278
|
+
# Should prices that match the filter be included or excluded.
|
|
26279
|
+
sig do
|
|
26280
|
+
returns(
|
|
26281
|
+
Orb::Price::UnitWithMultiplier::CompositePriceFilter::Operator::TaggedSymbol
|
|
26282
|
+
)
|
|
26283
|
+
end
|
|
26284
|
+
attr_accessor :operator
|
|
26285
|
+
|
|
26286
|
+
# The IDs or values that match this filter.
|
|
26287
|
+
sig { returns(T::Array[String]) }
|
|
26288
|
+
attr_accessor :values
|
|
26289
|
+
|
|
26290
|
+
sig do
|
|
26291
|
+
params(
|
|
26292
|
+
field:
|
|
26293
|
+
Orb::Price::UnitWithMultiplier::CompositePriceFilter::Field::OrSymbol,
|
|
26294
|
+
operator:
|
|
26295
|
+
Orb::Price::UnitWithMultiplier::CompositePriceFilter::Operator::OrSymbol,
|
|
26296
|
+
values: T::Array[String]
|
|
26297
|
+
).returns(T.attached_class)
|
|
26298
|
+
end
|
|
26299
|
+
def self.new(
|
|
26300
|
+
# The property of the price to filter on.
|
|
26301
|
+
field:,
|
|
26302
|
+
# Should prices that match the filter be included or excluded.
|
|
26303
|
+
operator:,
|
|
26304
|
+
# The IDs or values that match this filter.
|
|
26305
|
+
values:
|
|
26306
|
+
)
|
|
26307
|
+
end
|
|
26308
|
+
|
|
26309
|
+
sig do
|
|
26310
|
+
override.returns(
|
|
26311
|
+
{
|
|
26312
|
+
field:
|
|
26313
|
+
Orb::Price::UnitWithMultiplier::CompositePriceFilter::Field::TaggedSymbol,
|
|
26314
|
+
operator:
|
|
26315
|
+
Orb::Price::UnitWithMultiplier::CompositePriceFilter::Operator::TaggedSymbol,
|
|
26316
|
+
values: T::Array[String]
|
|
26317
|
+
}
|
|
26318
|
+
)
|
|
26319
|
+
end
|
|
26320
|
+
def to_hash
|
|
26321
|
+
end
|
|
26322
|
+
|
|
26323
|
+
# The property of the price to filter on.
|
|
26324
|
+
module Field
|
|
26325
|
+
extend Orb::Internal::Type::Enum
|
|
26326
|
+
|
|
26327
|
+
TaggedSymbol =
|
|
26328
|
+
T.type_alias do
|
|
26329
|
+
T.all(
|
|
26330
|
+
Symbol,
|
|
26331
|
+
Orb::Price::UnitWithMultiplier::CompositePriceFilter::Field
|
|
26332
|
+
)
|
|
26333
|
+
end
|
|
26334
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
26335
|
+
|
|
26336
|
+
PRICE_ID =
|
|
26337
|
+
T.let(
|
|
26338
|
+
:price_id,
|
|
26339
|
+
Orb::Price::UnitWithMultiplier::CompositePriceFilter::Field::TaggedSymbol
|
|
26340
|
+
)
|
|
26341
|
+
ITEM_ID =
|
|
26342
|
+
T.let(
|
|
26343
|
+
:item_id,
|
|
26344
|
+
Orb::Price::UnitWithMultiplier::CompositePriceFilter::Field::TaggedSymbol
|
|
26345
|
+
)
|
|
26346
|
+
PRICE_TYPE =
|
|
26347
|
+
T.let(
|
|
26348
|
+
:price_type,
|
|
26349
|
+
Orb::Price::UnitWithMultiplier::CompositePriceFilter::Field::TaggedSymbol
|
|
26350
|
+
)
|
|
26351
|
+
CURRENCY =
|
|
26352
|
+
T.let(
|
|
26353
|
+
:currency,
|
|
26354
|
+
Orb::Price::UnitWithMultiplier::CompositePriceFilter::Field::TaggedSymbol
|
|
26355
|
+
)
|
|
26356
|
+
PRICING_UNIT_ID =
|
|
26357
|
+
T.let(
|
|
26358
|
+
:pricing_unit_id,
|
|
26359
|
+
Orb::Price::UnitWithMultiplier::CompositePriceFilter::Field::TaggedSymbol
|
|
26360
|
+
)
|
|
26361
|
+
|
|
26362
|
+
sig do
|
|
26363
|
+
override.returns(
|
|
26364
|
+
T::Array[
|
|
26365
|
+
Orb::Price::UnitWithMultiplier::CompositePriceFilter::Field::TaggedSymbol
|
|
26366
|
+
]
|
|
26367
|
+
)
|
|
26368
|
+
end
|
|
26369
|
+
def self.values
|
|
26370
|
+
end
|
|
26371
|
+
end
|
|
26372
|
+
|
|
26373
|
+
# Should prices that match the filter be included or excluded.
|
|
26374
|
+
module Operator
|
|
26375
|
+
extend Orb::Internal::Type::Enum
|
|
26376
|
+
|
|
26377
|
+
TaggedSymbol =
|
|
26378
|
+
T.type_alias do
|
|
26379
|
+
T.all(
|
|
26380
|
+
Symbol,
|
|
26381
|
+
Orb::Price::UnitWithMultiplier::CompositePriceFilter::Operator
|
|
26382
|
+
)
|
|
26383
|
+
end
|
|
26384
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
26385
|
+
|
|
26386
|
+
INCLUDES =
|
|
26387
|
+
T.let(
|
|
26388
|
+
:includes,
|
|
26389
|
+
Orb::Price::UnitWithMultiplier::CompositePriceFilter::Operator::TaggedSymbol
|
|
26390
|
+
)
|
|
26391
|
+
EXCLUDES =
|
|
26392
|
+
T.let(
|
|
26393
|
+
:excludes,
|
|
26394
|
+
Orb::Price::UnitWithMultiplier::CompositePriceFilter::Operator::TaggedSymbol
|
|
26395
|
+
)
|
|
26396
|
+
|
|
26397
|
+
sig do
|
|
26398
|
+
override.returns(
|
|
26399
|
+
T::Array[
|
|
26400
|
+
Orb::Price::UnitWithMultiplier::CompositePriceFilter::Operator::TaggedSymbol
|
|
26401
|
+
]
|
|
26402
|
+
)
|
|
26403
|
+
end
|
|
26404
|
+
def self.values
|
|
26405
|
+
end
|
|
26406
|
+
end
|
|
26407
|
+
end
|
|
26408
|
+
|
|
26409
|
+
module PriceType
|
|
26410
|
+
extend Orb::Internal::Type::Enum
|
|
26411
|
+
|
|
26412
|
+
TaggedSymbol =
|
|
26413
|
+
T.type_alias do
|
|
26414
|
+
T.all(Symbol, Orb::Price::UnitWithMultiplier::PriceType)
|
|
26415
|
+
end
|
|
26416
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
26417
|
+
|
|
26418
|
+
USAGE_PRICE =
|
|
26419
|
+
T.let(
|
|
26420
|
+
:usage_price,
|
|
26421
|
+
Orb::Price::UnitWithMultiplier::PriceType::TaggedSymbol
|
|
26422
|
+
)
|
|
26423
|
+
FIXED_PRICE =
|
|
26424
|
+
T.let(
|
|
26425
|
+
:fixed_price,
|
|
26426
|
+
Orb::Price::UnitWithMultiplier::PriceType::TaggedSymbol
|
|
26427
|
+
)
|
|
26428
|
+
COMPOSITE_PRICE =
|
|
26429
|
+
T.let(
|
|
26430
|
+
:composite_price,
|
|
26431
|
+
Orb::Price::UnitWithMultiplier::PriceType::TaggedSymbol
|
|
26432
|
+
)
|
|
26433
|
+
|
|
26434
|
+
sig do
|
|
26435
|
+
override.returns(
|
|
26436
|
+
T::Array[Orb::Price::UnitWithMultiplier::PriceType::TaggedSymbol]
|
|
26437
|
+
)
|
|
26438
|
+
end
|
|
26439
|
+
def self.values
|
|
26440
|
+
end
|
|
26441
|
+
end
|
|
26442
|
+
|
|
26443
|
+
class UnitWithMultiplierConfig < Orb::Internal::Type::BaseModel
|
|
26444
|
+
OrHash =
|
|
26445
|
+
T.type_alias do
|
|
26446
|
+
T.any(
|
|
26447
|
+
Orb::Price::UnitWithMultiplier::UnitWithMultiplierConfig,
|
|
26448
|
+
Orb::Internal::AnyHash
|
|
26449
|
+
)
|
|
26450
|
+
end
|
|
26451
|
+
|
|
26452
|
+
# Sub-line label for list-price events that don't set display_name_key. Unlabeled
|
|
26453
|
+
# events with another multiplier are labeled by their multiplier (e.g. '0.8×
|
|
26454
|
+
# rate').
|
|
26455
|
+
sig { returns(String) }
|
|
26456
|
+
attr_accessor :default_display_name
|
|
26457
|
+
|
|
26458
|
+
# Event property holding the sub-line label for the event's rate (e.g.
|
|
26459
|
+
# 'Off-peak').
|
|
26460
|
+
sig { returns(String) }
|
|
26461
|
+
attr_accessor :display_name_key
|
|
26462
|
+
|
|
26463
|
+
# Event property holding the multiplier applied to unit_amount (e.g. 0.8 for a 20%
|
|
26464
|
+
# discount). Events without a number between 0 and 1000 with at most 12 decimal
|
|
26465
|
+
# places are charged at unit_amount.
|
|
26466
|
+
sig { returns(String) }
|
|
26467
|
+
attr_accessor :multiplier_key
|
|
26468
|
+
|
|
26469
|
+
# List price per unit, before the event's multiplier is applied.
|
|
26470
|
+
sig { returns(String) }
|
|
26471
|
+
attr_accessor :unit_amount
|
|
26472
|
+
|
|
26473
|
+
# Configuration for unit_with_multiplier pricing
|
|
26474
|
+
sig do
|
|
26475
|
+
params(
|
|
26476
|
+
default_display_name: String,
|
|
26477
|
+
display_name_key: String,
|
|
26478
|
+
multiplier_key: String,
|
|
26479
|
+
unit_amount: String
|
|
26480
|
+
).returns(T.attached_class)
|
|
26481
|
+
end
|
|
26482
|
+
def self.new(
|
|
26483
|
+
# Sub-line label for list-price events that don't set display_name_key. Unlabeled
|
|
26484
|
+
# events with another multiplier are labeled by their multiplier (e.g. '0.8×
|
|
26485
|
+
# rate').
|
|
26486
|
+
default_display_name:,
|
|
26487
|
+
# Event property holding the sub-line label for the event's rate (e.g.
|
|
26488
|
+
# 'Off-peak').
|
|
26489
|
+
display_name_key:,
|
|
26490
|
+
# Event property holding the multiplier applied to unit_amount (e.g. 0.8 for a 20%
|
|
26491
|
+
# discount). Events without a number between 0 and 1000 with at most 12 decimal
|
|
26492
|
+
# places are charged at unit_amount.
|
|
26493
|
+
multiplier_key:,
|
|
26494
|
+
# List price per unit, before the event's multiplier is applied.
|
|
26495
|
+
unit_amount:
|
|
26496
|
+
)
|
|
26497
|
+
end
|
|
26498
|
+
|
|
26499
|
+
sig do
|
|
26500
|
+
override.returns(
|
|
26501
|
+
{
|
|
26502
|
+
default_display_name: String,
|
|
26503
|
+
display_name_key: String,
|
|
26504
|
+
multiplier_key: String,
|
|
26505
|
+
unit_amount: String
|
|
26506
|
+
}
|
|
26507
|
+
)
|
|
26508
|
+
end
|
|
26509
|
+
def to_hash
|
|
26510
|
+
end
|
|
26511
|
+
end
|
|
26512
|
+
|
|
26513
|
+
class LicenseType < Orb::Internal::Type::BaseModel
|
|
26514
|
+
OrHash =
|
|
26515
|
+
T.type_alias do
|
|
26516
|
+
T.any(
|
|
26517
|
+
Orb::Price::UnitWithMultiplier::LicenseType,
|
|
26518
|
+
Orb::Internal::AnyHash
|
|
26519
|
+
)
|
|
26520
|
+
end
|
|
26521
|
+
|
|
26522
|
+
# The Orb-assigned unique identifier for the license type.
|
|
26523
|
+
sig { returns(String) }
|
|
26524
|
+
attr_accessor :id
|
|
26525
|
+
|
|
26526
|
+
# The key used for grouping licenses of this type. This is typically a user
|
|
26527
|
+
# identifier field.
|
|
26528
|
+
sig { returns(String) }
|
|
26529
|
+
attr_accessor :grouping_key
|
|
26530
|
+
|
|
26531
|
+
# The name of the license type.
|
|
26532
|
+
sig { returns(String) }
|
|
26533
|
+
attr_accessor :name
|
|
26534
|
+
|
|
26535
|
+
# The LicenseType resource represents a type of license that can be assigned to
|
|
26536
|
+
# users. License types are used during billing by grouping metrics on the
|
|
26537
|
+
# configured grouping key.
|
|
26538
|
+
sig do
|
|
26539
|
+
params(id: String, grouping_key: String, name: String).returns(
|
|
26540
|
+
T.attached_class
|
|
26541
|
+
)
|
|
26542
|
+
end
|
|
26543
|
+
def self.new(
|
|
26544
|
+
# The Orb-assigned unique identifier for the license type.
|
|
26545
|
+
id:,
|
|
26546
|
+
# The key used for grouping licenses of this type. This is typically a user
|
|
26547
|
+
# identifier field.
|
|
26548
|
+
grouping_key:,
|
|
26549
|
+
# The name of the license type.
|
|
26550
|
+
name:
|
|
26551
|
+
)
|
|
26552
|
+
end
|
|
26553
|
+
|
|
26554
|
+
sig do
|
|
26555
|
+
override.returns({ id: String, grouping_key: String, name: String })
|
|
26556
|
+
end
|
|
26557
|
+
def to_hash
|
|
26558
|
+
end
|
|
26559
|
+
end
|
|
26560
|
+
end
|
|
26561
|
+
|
|
25847
26562
|
sig { override.returns(T::Array[Orb::Price::Variants]) }
|
|
25848
26563
|
def self.variants
|
|
25849
26564
|
end
|