Class: Orb::Models::SubscriptionCreateParams::ReplacePrice

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/subscription_create_params.rb,
sig/orb/models/subscription_create_params.rbs

Defined Under Namespace

Modules: Price

Constant Summary collapse

Orb =

Returns:

  • (:NewSubscriptionUnitPrice)

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(replaces_price_id:, allocation_price: nil, discounts: nil, external_price_id: nil, fixed_price_quantity: nil, maximum_amount: nil, metric_parameter_overrides: nil, minimum_amount: nil, price: nil, price_id: nil) ⇒ Object

Some parameter documentations has been truncated, see Orb::Models::SubscriptionCreateParams::ReplacePrice for more details.

Parameters:



# File 'lib/orb/models/subscription_create_params.rb', line 3413

Instance Attribute Details

#allocation_priceOrb::Models::NewAllocationPrice?

The definition of a new allocation price to create and add to the subscription.

Parameters:

Returns:



3351
# File 'lib/orb/models/subscription_create_params.rb', line 3351

optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true

#discountsArray<Orb::Models::DiscountOverride>?

Deprecated.

[DEPRECATED] Use add_adjustments instead. The subscription's discounts for the replacement price.

Parameters:

Returns:



3360
# File 'lib/orb/models/subscription_create_params.rb', line 3360

optional :discounts, -> { Orb::Internal::Type::ArrayOf[Orb::DiscountOverride] }, nil?: true

#external_price_idString?

The external price id of the price to add to the subscription.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


3366
# File 'lib/orb/models/subscription_create_params.rb', line 3366

optional :external_price_id, String, nil?: true

#fixed_price_quantityFloat?

The new quantity of the price, if the price is a fixed price.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


3372
# File 'lib/orb/models/subscription_create_params.rb', line 3372

optional :fixed_price_quantity, Float, nil?: true

#maximum_amountString?

Deprecated.

[DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for the replacement price.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


3381
# File 'lib/orb/models/subscription_create_params.rb', line 3381

optional :maximum_amount, String, nil?: true

#metric_parameter_overridesHash{Symbol=>Object}?

Override values for parameterized billable metric variables. Keys are parameter names, values are the override values.

Parameters:

  • value (::Hash[Symbol, top], nil)

Returns:

  • (Hash{Symbol=>Object}, nil)


3388
3389
3390
# File 'lib/orb/models/subscription_create_params.rb', line 3388

optional :metric_parameter_overrides,
Orb::Internal::Type::HashOf[Orb::Internal::Type::Unknown],
nil?: true

#minimum_amountString?

Deprecated.

[DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for the replacement price.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


3399
# File 'lib/orb/models/subscription_create_params.rb', line 3399

optional :minimum_amount, String, nil?: true

#priceOrb::Models::NewSubscriptionUnitPrice, ...

New subscription price request body params.

Parameters:

  • value (Orb::Models::SubscriptionCreateParams::ReplacePrice::price, nil)

Returns:



3405
# File 'lib/orb/models/subscription_create_params.rb', line 3405

optional :price, union: -> { Orb::SubscriptionCreateParams::ReplacePrice::Price }, nil?: true

#price_idString?

The id of the price to add to the subscription.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


3411
# File 'lib/orb/models/subscription_create_params.rb', line 3411

optional :price_id, String, nil?: true

#replaces_price_idString

The id of the price on the plan to replace in the subscription.

Parameters:

  • value (String)

Returns:

  • (String)


3345
# File 'lib/orb/models/subscription_create_params.rb', line 3345

required :replaces_price_id, String

Instance Method Details

#to_hash{

Returns:

  • ({)


2378
# File 'sig/orb/models/subscription_create_params.rbs', line 2378

def to_hash: -> {