orb-billing 0.11.0 → 0.12.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 +19 -0
- data/README.md +1 -1
- data/lib/orb/internal/type/union.rb +3 -8
- data/lib/orb/internal/util.rb +8 -9
- data/lib/orb/models/amount_discount.rb +65 -1
- data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +1437 -15
- data/lib/orb/models/beta_create_plan_version_params.rb +1435 -15
- data/lib/orb/models/percentage_discount.rb +65 -1
- data/lib/orb/models/subscription_create_params.rb +1435 -15
- data/lib/orb/models/subscription_price_intervals_params.rb +715 -5
- data/lib/orb/models/subscription_redeem_coupon_params.rb +17 -9
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +1435 -15
- data/lib/orb/models/trial_discount.rb +65 -1
- data/lib/orb/models/usage_discount.rb +65 -1
- data/lib/orb/resources/subscriptions.rb +5 -3
- data/lib/orb/version.rb +1 -1
- data/rbi/orb/internal/util.rbi +2 -0
- data/rbi/orb/models/amount_discount.rbi +117 -0
- data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +6145 -3045
- data/rbi/orb/models/beta_create_plan_version_params.rbi +6096 -2996
- data/rbi/orb/models/percentage_discount.rbi +131 -0
- data/rbi/orb/models/subscription_create_params.rbi +6037 -2937
- data/rbi/orb/models/subscription_price_intervals_params.rbi +1633 -83
- data/rbi/orb/models/subscription_redeem_coupon_params.rbi +16 -8
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +6948 -3848
- data/rbi/orb/models/trial_discount.rbi +109 -0
- data/rbi/orb/models/usage_discount.rbi +109 -0
- data/rbi/orb/resources/subscriptions.rbi +6 -3
- data/sig/orb/models/amount_discount.rbs +58 -0
- data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +1130 -20
- data/sig/orb/models/beta_create_plan_version_params.rbs +1130 -20
- data/sig/orb/models/percentage_discount.rbs +58 -0
- data/sig/orb/models/subscription_create_params.rbs +1130 -20
- data/sig/orb/models/subscription_price_intervals_params.rbs +565 -10
- data/sig/orb/models/subscription_redeem_coupon_params.rbs +11 -6
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +1130 -20
- data/sig/orb/models/trial_discount.rbs +58 -0
- data/sig/orb/models/usage_discount.rbs +58 -0
- data/sig/orb/resources/subscriptions.rbs +2 -1
- metadata +2 -2
@@ -8921,12 +8921,44 @@ module Orb
|
|
8921
8921
|
# @return [Float]
|
8922
8922
|
required :percentage_discount, Float
|
8923
8923
|
|
8924
|
+
# @!attribute applies_to_all
|
8925
|
+
# If set, the adjustment will apply to every price on the subscription.
|
8926
|
+
#
|
8927
|
+
# @return [Boolean, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::AppliesToAll, nil]
|
8928
|
+
optional :applies_to_all,
|
8929
|
+
enum: -> {
|
8930
|
+
Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::AppliesToAll
|
8931
|
+
},
|
8932
|
+
nil?: true
|
8933
|
+
|
8934
|
+
# @!attribute applies_to_item_ids
|
8935
|
+
# The set of item IDs to which this adjustment applies.
|
8936
|
+
#
|
8937
|
+
# @return [Array<String>, nil]
|
8938
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
8939
|
+
|
8924
8940
|
# @!attribute applies_to_price_ids
|
8925
8941
|
# The set of price IDs to which this adjustment applies.
|
8926
8942
|
#
|
8927
8943
|
# @return [Array<String>, nil]
|
8928
8944
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
8929
8945
|
|
8946
|
+
# @!attribute currency
|
8947
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
8948
|
+
#
|
8949
|
+
# @return [String, nil]
|
8950
|
+
optional :currency, String, nil?: true
|
8951
|
+
|
8952
|
+
# @!attribute filters
|
8953
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
8954
|
+
#
|
8955
|
+
# @return [Array<Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter>, nil]
|
8956
|
+
optional :filters,
|
8957
|
+
-> {
|
8958
|
+
Orb::Internal::Type::ArrayOf[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter]
|
8959
|
+
},
|
8960
|
+
nil?: true
|
8961
|
+
|
8930
8962
|
# @!attribute is_invoice_level
|
8931
8963
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
8932
8964
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -8934,18 +8966,128 @@ module Orb
|
|
8934
8966
|
# @return [Boolean, nil]
|
8935
8967
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
8936
8968
|
|
8937
|
-
# @!
|
8969
|
+
# @!attribute price_type
|
8970
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
8971
|
+
#
|
8972
|
+
# @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::PriceType, nil]
|
8973
|
+
optional :price_type,
|
8974
|
+
enum: -> {
|
8975
|
+
Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::PriceType
|
8976
|
+
},
|
8977
|
+
nil?: true
|
8978
|
+
|
8979
|
+
# @!method initialize(percentage_discount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :percentage_discount)
|
8938
8980
|
# Some parameter documentations has been truncated, see
|
8939
8981
|
# {Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount}
|
8940
8982
|
# for more details.
|
8941
8983
|
#
|
8942
8984
|
# @param percentage_discount [Float]
|
8943
8985
|
#
|
8986
|
+
# @param applies_to_all [Boolean, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
8987
|
+
#
|
8988
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
8989
|
+
#
|
8944
8990
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
8945
8991
|
#
|
8992
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
8993
|
+
#
|
8994
|
+
# @param filters [Array<Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
8995
|
+
#
|
8946
8996
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
8947
8997
|
#
|
8998
|
+
# @param price_type [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
8999
|
+
#
|
8948
9000
|
# @param adjustment_type [Symbol, :percentage_discount]
|
9001
|
+
|
9002
|
+
# If set, the adjustment will apply to every price on the subscription.
|
9003
|
+
#
|
9004
|
+
# @see Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount#applies_to_all
|
9005
|
+
module AppliesToAll
|
9006
|
+
extend Orb::Internal::Type::Enum
|
9007
|
+
|
9008
|
+
TRUE = true
|
9009
|
+
|
9010
|
+
# @!method self.values
|
9011
|
+
# @return [Array<Boolean>]
|
9012
|
+
end
|
9013
|
+
|
9014
|
+
class Filter < Orb::Internal::Type::BaseModel
|
9015
|
+
# @!attribute field
|
9016
|
+
# The property of the price to filter on.
|
9017
|
+
#
|
9018
|
+
# @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Field]
|
9019
|
+
required :field,
|
9020
|
+
enum: -> {
|
9021
|
+
Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Field
|
9022
|
+
}
|
9023
|
+
|
9024
|
+
# @!attribute operator
|
9025
|
+
# Should prices that match the filter be included or excluded.
|
9026
|
+
#
|
9027
|
+
# @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Operator]
|
9028
|
+
required :operator,
|
9029
|
+
enum: -> {
|
9030
|
+
Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Operator
|
9031
|
+
}
|
9032
|
+
|
9033
|
+
# @!attribute values
|
9034
|
+
# The IDs or values that match this filter.
|
9035
|
+
#
|
9036
|
+
# @return [Array<String>]
|
9037
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
9038
|
+
|
9039
|
+
# @!method initialize(field:, operator:, values:)
|
9040
|
+
# @param field [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Field] The property of the price to filter on.
|
9041
|
+
#
|
9042
|
+
# @param operator [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
9043
|
+
#
|
9044
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
9045
|
+
|
9046
|
+
# The property of the price to filter on.
|
9047
|
+
#
|
9048
|
+
# @see Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter#field
|
9049
|
+
module Field
|
9050
|
+
extend Orb::Internal::Type::Enum
|
9051
|
+
|
9052
|
+
PRICE_ID = :price_id
|
9053
|
+
ITEM_ID = :item_id
|
9054
|
+
PRICE_TYPE = :price_type
|
9055
|
+
CURRENCY = :currency
|
9056
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
9057
|
+
|
9058
|
+
# @!method self.values
|
9059
|
+
# @return [Array<Symbol>]
|
9060
|
+
end
|
9061
|
+
|
9062
|
+
# Should prices that match the filter be included or excluded.
|
9063
|
+
#
|
9064
|
+
# @see Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount::Filter#operator
|
9065
|
+
module Operator
|
9066
|
+
extend Orb::Internal::Type::Enum
|
9067
|
+
|
9068
|
+
INCLUDES = :includes
|
9069
|
+
EXCLUDES = :excludes
|
9070
|
+
|
9071
|
+
# @!method self.values
|
9072
|
+
# @return [Array<Symbol>]
|
9073
|
+
end
|
9074
|
+
end
|
9075
|
+
|
9076
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
9077
|
+
#
|
9078
|
+
# @see Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::PercentageDiscount#price_type
|
9079
|
+
module PriceType
|
9080
|
+
extend Orb::Internal::Type::Enum
|
9081
|
+
|
9082
|
+
USAGE = :usage
|
9083
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
9084
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
9085
|
+
FIXED = :fixed
|
9086
|
+
IN_ARREARS = :in_arrears
|
9087
|
+
|
9088
|
+
# @!method self.values
|
9089
|
+
# @return [Array<Symbol>]
|
9090
|
+
end
|
8949
9091
|
end
|
8950
9092
|
|
8951
9093
|
class UsageDiscount < Orb::Internal::Type::BaseModel
|
@@ -8959,12 +9101,44 @@ module Orb
|
|
8959
9101
|
# @return [Float]
|
8960
9102
|
required :usage_discount, Float
|
8961
9103
|
|
9104
|
+
# @!attribute applies_to_all
|
9105
|
+
# If set, the adjustment will apply to every price on the subscription.
|
9106
|
+
#
|
9107
|
+
# @return [Boolean, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::AppliesToAll, nil]
|
9108
|
+
optional :applies_to_all,
|
9109
|
+
enum: -> {
|
9110
|
+
Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::AppliesToAll
|
9111
|
+
},
|
9112
|
+
nil?: true
|
9113
|
+
|
9114
|
+
# @!attribute applies_to_item_ids
|
9115
|
+
# The set of item IDs to which this adjustment applies.
|
9116
|
+
#
|
9117
|
+
# @return [Array<String>, nil]
|
9118
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
9119
|
+
|
8962
9120
|
# @!attribute applies_to_price_ids
|
8963
9121
|
# The set of price IDs to which this adjustment applies.
|
8964
9122
|
#
|
8965
9123
|
# @return [Array<String>, nil]
|
8966
9124
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
8967
9125
|
|
9126
|
+
# @!attribute currency
|
9127
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
9128
|
+
#
|
9129
|
+
# @return [String, nil]
|
9130
|
+
optional :currency, String, nil?: true
|
9131
|
+
|
9132
|
+
# @!attribute filters
|
9133
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
9134
|
+
#
|
9135
|
+
# @return [Array<Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter>, nil]
|
9136
|
+
optional :filters,
|
9137
|
+
-> {
|
9138
|
+
Orb::Internal::Type::ArrayOf[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter]
|
9139
|
+
},
|
9140
|
+
nil?: true
|
9141
|
+
|
8968
9142
|
# @!attribute is_invoice_level
|
8969
9143
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
8970
9144
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -8972,18 +9146,128 @@ module Orb
|
|
8972
9146
|
# @return [Boolean, nil]
|
8973
9147
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
8974
9148
|
|
8975
|
-
# @!
|
9149
|
+
# @!attribute price_type
|
9150
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
9151
|
+
#
|
9152
|
+
# @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::PriceType, nil]
|
9153
|
+
optional :price_type,
|
9154
|
+
enum: -> {
|
9155
|
+
Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::PriceType
|
9156
|
+
},
|
9157
|
+
nil?: true
|
9158
|
+
|
9159
|
+
# @!method initialize(usage_discount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :usage_discount)
|
8976
9160
|
# Some parameter documentations has been truncated, see
|
8977
9161
|
# {Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount}
|
8978
9162
|
# for more details.
|
8979
9163
|
#
|
8980
9164
|
# @param usage_discount [Float]
|
8981
9165
|
#
|
9166
|
+
# @param applies_to_all [Boolean, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
9167
|
+
#
|
9168
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
9169
|
+
#
|
8982
9170
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
8983
9171
|
#
|
9172
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
9173
|
+
#
|
9174
|
+
# @param filters [Array<Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
9175
|
+
#
|
8984
9176
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
8985
9177
|
#
|
9178
|
+
# @param price_type [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
9179
|
+
#
|
8986
9180
|
# @param adjustment_type [Symbol, :usage_discount]
|
9181
|
+
|
9182
|
+
# If set, the adjustment will apply to every price on the subscription.
|
9183
|
+
#
|
9184
|
+
# @see Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount#applies_to_all
|
9185
|
+
module AppliesToAll
|
9186
|
+
extend Orb::Internal::Type::Enum
|
9187
|
+
|
9188
|
+
TRUE = true
|
9189
|
+
|
9190
|
+
# @!method self.values
|
9191
|
+
# @return [Array<Boolean>]
|
9192
|
+
end
|
9193
|
+
|
9194
|
+
class Filter < Orb::Internal::Type::BaseModel
|
9195
|
+
# @!attribute field
|
9196
|
+
# The property of the price to filter on.
|
9197
|
+
#
|
9198
|
+
# @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Field]
|
9199
|
+
required :field,
|
9200
|
+
enum: -> {
|
9201
|
+
Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Field
|
9202
|
+
}
|
9203
|
+
|
9204
|
+
# @!attribute operator
|
9205
|
+
# Should prices that match the filter be included or excluded.
|
9206
|
+
#
|
9207
|
+
# @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Operator]
|
9208
|
+
required :operator,
|
9209
|
+
enum: -> {
|
9210
|
+
Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Operator
|
9211
|
+
}
|
9212
|
+
|
9213
|
+
# @!attribute values
|
9214
|
+
# The IDs or values that match this filter.
|
9215
|
+
#
|
9216
|
+
# @return [Array<String>]
|
9217
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
9218
|
+
|
9219
|
+
# @!method initialize(field:, operator:, values:)
|
9220
|
+
# @param field [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Field] The property of the price to filter on.
|
9221
|
+
#
|
9222
|
+
# @param operator [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
9223
|
+
#
|
9224
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
9225
|
+
|
9226
|
+
# The property of the price to filter on.
|
9227
|
+
#
|
9228
|
+
# @see Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter#field
|
9229
|
+
module Field
|
9230
|
+
extend Orb::Internal::Type::Enum
|
9231
|
+
|
9232
|
+
PRICE_ID = :price_id
|
9233
|
+
ITEM_ID = :item_id
|
9234
|
+
PRICE_TYPE = :price_type
|
9235
|
+
CURRENCY = :currency
|
9236
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
9237
|
+
|
9238
|
+
# @!method self.values
|
9239
|
+
# @return [Array<Symbol>]
|
9240
|
+
end
|
9241
|
+
|
9242
|
+
# Should prices that match the filter be included or excluded.
|
9243
|
+
#
|
9244
|
+
# @see Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount::Filter#operator
|
9245
|
+
module Operator
|
9246
|
+
extend Orb::Internal::Type::Enum
|
9247
|
+
|
9248
|
+
INCLUDES = :includes
|
9249
|
+
EXCLUDES = :excludes
|
9250
|
+
|
9251
|
+
# @!method self.values
|
9252
|
+
# @return [Array<Symbol>]
|
9253
|
+
end
|
9254
|
+
end
|
9255
|
+
|
9256
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
9257
|
+
#
|
9258
|
+
# @see Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::UsageDiscount#price_type
|
9259
|
+
module PriceType
|
9260
|
+
extend Orb::Internal::Type::Enum
|
9261
|
+
|
9262
|
+
USAGE = :usage
|
9263
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
9264
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
9265
|
+
FIXED = :fixed
|
9266
|
+
IN_ARREARS = :in_arrears
|
9267
|
+
|
9268
|
+
# @!method self.values
|
9269
|
+
# @return [Array<Symbol>]
|
9270
|
+
end
|
8987
9271
|
end
|
8988
9272
|
|
8989
9273
|
class AmountDiscount < Orb::Internal::Type::BaseModel
|
@@ -8997,12 +9281,44 @@ module Orb
|
|
8997
9281
|
# @return [String]
|
8998
9282
|
required :amount_discount, String
|
8999
9283
|
|
9284
|
+
# @!attribute applies_to_all
|
9285
|
+
# If set, the adjustment will apply to every price on the subscription.
|
9286
|
+
#
|
9287
|
+
# @return [Boolean, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::AppliesToAll, nil]
|
9288
|
+
optional :applies_to_all,
|
9289
|
+
enum: -> {
|
9290
|
+
Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::AppliesToAll
|
9291
|
+
},
|
9292
|
+
nil?: true
|
9293
|
+
|
9294
|
+
# @!attribute applies_to_item_ids
|
9295
|
+
# The set of item IDs to which this adjustment applies.
|
9296
|
+
#
|
9297
|
+
# @return [Array<String>, nil]
|
9298
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
9299
|
+
|
9000
9300
|
# @!attribute applies_to_price_ids
|
9001
9301
|
# The set of price IDs to which this adjustment applies.
|
9002
9302
|
#
|
9003
9303
|
# @return [Array<String>, nil]
|
9004
9304
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
9005
9305
|
|
9306
|
+
# @!attribute currency
|
9307
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
9308
|
+
#
|
9309
|
+
# @return [String, nil]
|
9310
|
+
optional :currency, String, nil?: true
|
9311
|
+
|
9312
|
+
# @!attribute filters
|
9313
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
9314
|
+
#
|
9315
|
+
# @return [Array<Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter>, nil]
|
9316
|
+
optional :filters,
|
9317
|
+
-> {
|
9318
|
+
Orb::Internal::Type::ArrayOf[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter]
|
9319
|
+
},
|
9320
|
+
nil?: true
|
9321
|
+
|
9006
9322
|
# @!attribute is_invoice_level
|
9007
9323
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
9008
9324
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -9010,18 +9326,128 @@ module Orb
|
|
9010
9326
|
# @return [Boolean, nil]
|
9011
9327
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
9012
9328
|
|
9013
|
-
# @!
|
9329
|
+
# @!attribute price_type
|
9330
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
9331
|
+
#
|
9332
|
+
# @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::PriceType, nil]
|
9333
|
+
optional :price_type,
|
9334
|
+
enum: -> {
|
9335
|
+
Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::PriceType
|
9336
|
+
},
|
9337
|
+
nil?: true
|
9338
|
+
|
9339
|
+
# @!method initialize(amount_discount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :amount_discount)
|
9014
9340
|
# Some parameter documentations has been truncated, see
|
9015
9341
|
# {Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount}
|
9016
9342
|
# for more details.
|
9017
9343
|
#
|
9018
9344
|
# @param amount_discount [String]
|
9019
9345
|
#
|
9346
|
+
# @param applies_to_all [Boolean, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
9347
|
+
#
|
9348
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
9349
|
+
#
|
9020
9350
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
9021
9351
|
#
|
9352
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
9353
|
+
#
|
9354
|
+
# @param filters [Array<Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
9355
|
+
#
|
9022
9356
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
9023
9357
|
#
|
9358
|
+
# @param price_type [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
9359
|
+
#
|
9024
9360
|
# @param adjustment_type [Symbol, :amount_discount]
|
9361
|
+
|
9362
|
+
# If set, the adjustment will apply to every price on the subscription.
|
9363
|
+
#
|
9364
|
+
# @see Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount#applies_to_all
|
9365
|
+
module AppliesToAll
|
9366
|
+
extend Orb::Internal::Type::Enum
|
9367
|
+
|
9368
|
+
TRUE = true
|
9369
|
+
|
9370
|
+
# @!method self.values
|
9371
|
+
# @return [Array<Boolean>]
|
9372
|
+
end
|
9373
|
+
|
9374
|
+
class Filter < Orb::Internal::Type::BaseModel
|
9375
|
+
# @!attribute field
|
9376
|
+
# The property of the price to filter on.
|
9377
|
+
#
|
9378
|
+
# @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Field]
|
9379
|
+
required :field,
|
9380
|
+
enum: -> {
|
9381
|
+
Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Field
|
9382
|
+
}
|
9383
|
+
|
9384
|
+
# @!attribute operator
|
9385
|
+
# Should prices that match the filter be included or excluded.
|
9386
|
+
#
|
9387
|
+
# @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Operator]
|
9388
|
+
required :operator,
|
9389
|
+
enum: -> {
|
9390
|
+
Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Operator
|
9391
|
+
}
|
9392
|
+
|
9393
|
+
# @!attribute values
|
9394
|
+
# The IDs or values that match this filter.
|
9395
|
+
#
|
9396
|
+
# @return [Array<String>]
|
9397
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
9398
|
+
|
9399
|
+
# @!method initialize(field:, operator:, values:)
|
9400
|
+
# @param field [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Field] The property of the price to filter on.
|
9401
|
+
#
|
9402
|
+
# @param operator [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
9403
|
+
#
|
9404
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
9405
|
+
|
9406
|
+
# The property of the price to filter on.
|
9407
|
+
#
|
9408
|
+
# @see Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter#field
|
9409
|
+
module Field
|
9410
|
+
extend Orb::Internal::Type::Enum
|
9411
|
+
|
9412
|
+
PRICE_ID = :price_id
|
9413
|
+
ITEM_ID = :item_id
|
9414
|
+
PRICE_TYPE = :price_type
|
9415
|
+
CURRENCY = :currency
|
9416
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
9417
|
+
|
9418
|
+
# @!method self.values
|
9419
|
+
# @return [Array<Symbol>]
|
9420
|
+
end
|
9421
|
+
|
9422
|
+
# Should prices that match the filter be included or excluded.
|
9423
|
+
#
|
9424
|
+
# @see Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount::Filter#operator
|
9425
|
+
module Operator
|
9426
|
+
extend Orb::Internal::Type::Enum
|
9427
|
+
|
9428
|
+
INCLUDES = :includes
|
9429
|
+
EXCLUDES = :excludes
|
9430
|
+
|
9431
|
+
# @!method self.values
|
9432
|
+
# @return [Array<Symbol>]
|
9433
|
+
end
|
9434
|
+
end
|
9435
|
+
|
9436
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
9437
|
+
#
|
9438
|
+
# @see Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::AmountDiscount#price_type
|
9439
|
+
module PriceType
|
9440
|
+
extend Orb::Internal::Type::Enum
|
9441
|
+
|
9442
|
+
USAGE = :usage
|
9443
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
9444
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
9445
|
+
FIXED = :fixed
|
9446
|
+
IN_ARREARS = :in_arrears
|
9447
|
+
|
9448
|
+
# @!method self.values
|
9449
|
+
# @return [Array<Symbol>]
|
9450
|
+
end
|
9025
9451
|
end
|
9026
9452
|
|
9027
9453
|
class Minimum < Orb::Internal::Type::BaseModel
|
@@ -9041,12 +9467,44 @@ module Orb
|
|
9041
9467
|
# @return [String]
|
9042
9468
|
required :minimum_amount, String
|
9043
9469
|
|
9470
|
+
# @!attribute applies_to_all
|
9471
|
+
# If set, the adjustment will apply to every price on the subscription.
|
9472
|
+
#
|
9473
|
+
# @return [Boolean, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::AppliesToAll, nil]
|
9474
|
+
optional :applies_to_all,
|
9475
|
+
enum: -> {
|
9476
|
+
Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::AppliesToAll
|
9477
|
+
},
|
9478
|
+
nil?: true
|
9479
|
+
|
9480
|
+
# @!attribute applies_to_item_ids
|
9481
|
+
# The set of item IDs to which this adjustment applies.
|
9482
|
+
#
|
9483
|
+
# @return [Array<String>, nil]
|
9484
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
9485
|
+
|
9044
9486
|
# @!attribute applies_to_price_ids
|
9045
9487
|
# The set of price IDs to which this adjustment applies.
|
9046
9488
|
#
|
9047
9489
|
# @return [Array<String>, nil]
|
9048
9490
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
9049
9491
|
|
9492
|
+
# @!attribute currency
|
9493
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
9494
|
+
#
|
9495
|
+
# @return [String, nil]
|
9496
|
+
optional :currency, String, nil?: true
|
9497
|
+
|
9498
|
+
# @!attribute filters
|
9499
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
9500
|
+
#
|
9501
|
+
# @return [Array<Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter>, nil]
|
9502
|
+
optional :filters,
|
9503
|
+
-> {
|
9504
|
+
Orb::Internal::Type::ArrayOf[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter]
|
9505
|
+
},
|
9506
|
+
nil?: true
|
9507
|
+
|
9050
9508
|
# @!attribute is_invoice_level
|
9051
9509
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
9052
9510
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -9054,7 +9512,17 @@ module Orb
|
|
9054
9512
|
# @return [Boolean, nil]
|
9055
9513
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
9056
9514
|
|
9057
|
-
# @!
|
9515
|
+
# @!attribute price_type
|
9516
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
9517
|
+
#
|
9518
|
+
# @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::PriceType, nil]
|
9519
|
+
optional :price_type,
|
9520
|
+
enum: -> {
|
9521
|
+
Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::PriceType
|
9522
|
+
},
|
9523
|
+
nil?: true
|
9524
|
+
|
9525
|
+
# @!method initialize(item_id:, minimum_amount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :minimum)
|
9058
9526
|
# Some parameter documentations has been truncated, see
|
9059
9527
|
# {Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum}
|
9060
9528
|
# for more details.
|
@@ -9063,11 +9531,111 @@ module Orb
|
|
9063
9531
|
#
|
9064
9532
|
# @param minimum_amount [String]
|
9065
9533
|
#
|
9534
|
+
# @param applies_to_all [Boolean, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
9535
|
+
#
|
9536
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
9537
|
+
#
|
9066
9538
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
9067
9539
|
#
|
9540
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
9541
|
+
#
|
9542
|
+
# @param filters [Array<Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
9543
|
+
#
|
9068
9544
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
9069
9545
|
#
|
9546
|
+
# @param price_type [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
9547
|
+
#
|
9070
9548
|
# @param adjustment_type [Symbol, :minimum]
|
9549
|
+
|
9550
|
+
# If set, the adjustment will apply to every price on the subscription.
|
9551
|
+
#
|
9552
|
+
# @see Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum#applies_to_all
|
9553
|
+
module AppliesToAll
|
9554
|
+
extend Orb::Internal::Type::Enum
|
9555
|
+
|
9556
|
+
TRUE = true
|
9557
|
+
|
9558
|
+
# @!method self.values
|
9559
|
+
# @return [Array<Boolean>]
|
9560
|
+
end
|
9561
|
+
|
9562
|
+
class Filter < Orb::Internal::Type::BaseModel
|
9563
|
+
# @!attribute field
|
9564
|
+
# The property of the price to filter on.
|
9565
|
+
#
|
9566
|
+
# @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Field]
|
9567
|
+
required :field,
|
9568
|
+
enum: -> {
|
9569
|
+
Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Field
|
9570
|
+
}
|
9571
|
+
|
9572
|
+
# @!attribute operator
|
9573
|
+
# Should prices that match the filter be included or excluded.
|
9574
|
+
#
|
9575
|
+
# @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Operator]
|
9576
|
+
required :operator,
|
9577
|
+
enum: -> {
|
9578
|
+
Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Operator
|
9579
|
+
}
|
9580
|
+
|
9581
|
+
# @!attribute values
|
9582
|
+
# The IDs or values that match this filter.
|
9583
|
+
#
|
9584
|
+
# @return [Array<String>]
|
9585
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
9586
|
+
|
9587
|
+
# @!method initialize(field:, operator:, values:)
|
9588
|
+
# @param field [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Field] The property of the price to filter on.
|
9589
|
+
#
|
9590
|
+
# @param operator [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter::Operator] Should prices that match the filter be included or excluded.
|
9591
|
+
#
|
9592
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
9593
|
+
|
9594
|
+
# The property of the price to filter on.
|
9595
|
+
#
|
9596
|
+
# @see Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter#field
|
9597
|
+
module Field
|
9598
|
+
extend Orb::Internal::Type::Enum
|
9599
|
+
|
9600
|
+
PRICE_ID = :price_id
|
9601
|
+
ITEM_ID = :item_id
|
9602
|
+
PRICE_TYPE = :price_type
|
9603
|
+
CURRENCY = :currency
|
9604
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
9605
|
+
|
9606
|
+
# @!method self.values
|
9607
|
+
# @return [Array<Symbol>]
|
9608
|
+
end
|
9609
|
+
|
9610
|
+
# Should prices that match the filter be included or excluded.
|
9611
|
+
#
|
9612
|
+
# @see Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum::Filter#operator
|
9613
|
+
module Operator
|
9614
|
+
extend Orb::Internal::Type::Enum
|
9615
|
+
|
9616
|
+
INCLUDES = :includes
|
9617
|
+
EXCLUDES = :excludes
|
9618
|
+
|
9619
|
+
# @!method self.values
|
9620
|
+
# @return [Array<Symbol>]
|
9621
|
+
end
|
9622
|
+
end
|
9623
|
+
|
9624
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
9625
|
+
#
|
9626
|
+
# @see Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Minimum#price_type
|
9627
|
+
module PriceType
|
9628
|
+
extend Orb::Internal::Type::Enum
|
9629
|
+
|
9630
|
+
USAGE = :usage
|
9631
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
9632
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
9633
|
+
FIXED = :fixed
|
9634
|
+
IN_ARREARS = :in_arrears
|
9635
|
+
|
9636
|
+
# @!method self.values
|
9637
|
+
# @return [Array<Symbol>]
|
9638
|
+
end
|
9071
9639
|
end
|
9072
9640
|
|
9073
9641
|
class Maximum < Orb::Internal::Type::BaseModel
|
@@ -9081,12 +9649,44 @@ module Orb
|
|
9081
9649
|
# @return [String]
|
9082
9650
|
required :maximum_amount, String
|
9083
9651
|
|
9652
|
+
# @!attribute applies_to_all
|
9653
|
+
# If set, the adjustment will apply to every price on the subscription.
|
9654
|
+
#
|
9655
|
+
# @return [Boolean, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::AppliesToAll, nil]
|
9656
|
+
optional :applies_to_all,
|
9657
|
+
enum: -> {
|
9658
|
+
Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::AppliesToAll
|
9659
|
+
},
|
9660
|
+
nil?: true
|
9661
|
+
|
9662
|
+
# @!attribute applies_to_item_ids
|
9663
|
+
# The set of item IDs to which this adjustment applies.
|
9664
|
+
#
|
9665
|
+
# @return [Array<String>, nil]
|
9666
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
9667
|
+
|
9084
9668
|
# @!attribute applies_to_price_ids
|
9085
9669
|
# The set of price IDs to which this adjustment applies.
|
9086
9670
|
#
|
9087
9671
|
# @return [Array<String>, nil]
|
9088
9672
|
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
9089
9673
|
|
9674
|
+
# @!attribute currency
|
9675
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
9676
|
+
#
|
9677
|
+
# @return [String, nil]
|
9678
|
+
optional :currency, String, nil?: true
|
9679
|
+
|
9680
|
+
# @!attribute filters
|
9681
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
9682
|
+
#
|
9683
|
+
# @return [Array<Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter>, nil]
|
9684
|
+
optional :filters,
|
9685
|
+
-> {
|
9686
|
+
Orb::Internal::Type::ArrayOf[Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter]
|
9687
|
+
},
|
9688
|
+
nil?: true
|
9689
|
+
|
9090
9690
|
# @!attribute is_invoice_level
|
9091
9691
|
# When false, this adjustment will be applied to a single price. Otherwise, it
|
9092
9692
|
# will be applied at the invoice level, possibly to multiple prices.
|
@@ -9094,18 +9694,128 @@ module Orb
|
|
9094
9694
|
# @return [Boolean, nil]
|
9095
9695
|
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
9096
9696
|
|
9097
|
-
# @!
|
9697
|
+
# @!attribute price_type
|
9698
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
9699
|
+
#
|
9700
|
+
# @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::PriceType, nil]
|
9701
|
+
optional :price_type,
|
9702
|
+
enum: -> {
|
9703
|
+
Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::PriceType
|
9704
|
+
},
|
9705
|
+
nil?: true
|
9706
|
+
|
9707
|
+
# @!method initialize(maximum_amount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :maximum)
|
9098
9708
|
# Some parameter documentations has been truncated, see
|
9099
9709
|
# {Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum}
|
9100
9710
|
# for more details.
|
9101
9711
|
#
|
9102
9712
|
# @param maximum_amount [String]
|
9103
9713
|
#
|
9714
|
+
# @param applies_to_all [Boolean, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
9715
|
+
#
|
9716
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
9717
|
+
#
|
9104
9718
|
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
9105
9719
|
#
|
9720
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
9721
|
+
#
|
9722
|
+
# @param filters [Array<Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
9723
|
+
#
|
9106
9724
|
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
9107
9725
|
#
|
9726
|
+
# @param price_type [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
9727
|
+
#
|
9108
9728
|
# @param adjustment_type [Symbol, :maximum]
|
9729
|
+
|
9730
|
+
# If set, the adjustment will apply to every price on the subscription.
|
9731
|
+
#
|
9732
|
+
# @see Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum#applies_to_all
|
9733
|
+
module AppliesToAll
|
9734
|
+
extend Orb::Internal::Type::Enum
|
9735
|
+
|
9736
|
+
TRUE = true
|
9737
|
+
|
9738
|
+
# @!method self.values
|
9739
|
+
# @return [Array<Boolean>]
|
9740
|
+
end
|
9741
|
+
|
9742
|
+
class Filter < Orb::Internal::Type::BaseModel
|
9743
|
+
# @!attribute field
|
9744
|
+
# The property of the price to filter on.
|
9745
|
+
#
|
9746
|
+
# @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Field]
|
9747
|
+
required :field,
|
9748
|
+
enum: -> {
|
9749
|
+
Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Field
|
9750
|
+
}
|
9751
|
+
|
9752
|
+
# @!attribute operator
|
9753
|
+
# Should prices that match the filter be included or excluded.
|
9754
|
+
#
|
9755
|
+
# @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Operator]
|
9756
|
+
required :operator,
|
9757
|
+
enum: -> {
|
9758
|
+
Orb::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Operator
|
9759
|
+
}
|
9760
|
+
|
9761
|
+
# @!attribute values
|
9762
|
+
# The IDs or values that match this filter.
|
9763
|
+
#
|
9764
|
+
# @return [Array<String>]
|
9765
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
9766
|
+
|
9767
|
+
# @!method initialize(field:, operator:, values:)
|
9768
|
+
# @param field [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Field] The property of the price to filter on.
|
9769
|
+
#
|
9770
|
+
# @param operator [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter::Operator] Should prices that match the filter be included or excluded.
|
9771
|
+
#
|
9772
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
9773
|
+
|
9774
|
+
# The property of the price to filter on.
|
9775
|
+
#
|
9776
|
+
# @see Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter#field
|
9777
|
+
module Field
|
9778
|
+
extend Orb::Internal::Type::Enum
|
9779
|
+
|
9780
|
+
PRICE_ID = :price_id
|
9781
|
+
ITEM_ID = :item_id
|
9782
|
+
PRICE_TYPE = :price_type
|
9783
|
+
CURRENCY = :currency
|
9784
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
9785
|
+
|
9786
|
+
# @!method self.values
|
9787
|
+
# @return [Array<Symbol>]
|
9788
|
+
end
|
9789
|
+
|
9790
|
+
# Should prices that match the filter be included or excluded.
|
9791
|
+
#
|
9792
|
+
# @see Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum::Filter#operator
|
9793
|
+
module Operator
|
9794
|
+
extend Orb::Internal::Type::Enum
|
9795
|
+
|
9796
|
+
INCLUDES = :includes
|
9797
|
+
EXCLUDES = :excludes
|
9798
|
+
|
9799
|
+
# @!method self.values
|
9800
|
+
# @return [Array<Symbol>]
|
9801
|
+
end
|
9802
|
+
end
|
9803
|
+
|
9804
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
9805
|
+
#
|
9806
|
+
# @see Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::Maximum#price_type
|
9807
|
+
module PriceType
|
9808
|
+
extend Orb::Internal::Type::Enum
|
9809
|
+
|
9810
|
+
USAGE = :usage
|
9811
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
9812
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
9813
|
+
FIXED = :fixed
|
9814
|
+
IN_ARREARS = :in_arrears
|
9815
|
+
|
9816
|
+
# @!method self.values
|
9817
|
+
# @return [Array<Symbol>]
|
9818
|
+
end
|
9109
9819
|
end
|
9110
9820
|
|
9111
9821
|
# @!method self.variants
|