Class: Orb::Models::BetaCreatePlanVersionParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/orb/models/beta_create_plan_version_params.rb,
sig/orb/models/beta_create_plan_version_params.rbs

Overview

See Also:

  • Orb::Resources::Beta#create_plan_version

Defined Under Namespace

Classes: AddAdjustment, AddPrice, RemoveAdjustment, RemovePrice, ReplaceAdjustment, ReplacePrice

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(price_id:, plan_phase_order: nil) ⇒ Object

Parameters:

  • price_id (String) —

    The id of the price to remove from the plan.

  • plan_phase_order (Integer, nil) (defaults to: nil) —

    The phase to remove this price from.



# File 'lib/orb/models/beta_create_plan_version_params.rb', line 3522

Instance Attribute Details

#add_adjustments ⇒ Array<Orb::Models::BetaCreatePlanVersionParams::AddAdjustment>?

Additional adjustments to be added to the plan.

Parameters:

  • value (::Array[Orb::BetaCreatePlanVersionParams::AddAdjustment], nil)

Returns:



25
26
27
# File 'lib/orb/models/beta_create_plan_version_params.rb', line 25

optional :add_adjustments,
-> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddAdjustment] },
nil?: true

#add_prices ⇒ Array<Orb::Models::BetaCreatePlanVersionParams::AddPrice>?

Additional prices to be added to the plan.

Parameters:

  • value (::Array[Orb::BetaCreatePlanVersionParams::AddPrice], nil)

Returns:



33
34
35
# File 'lib/orb/models/beta_create_plan_version_params.rb', line 33

optional :add_prices,
-> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice] },
nil?: true

#plan_id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


13
# File 'lib/orb/models/beta_create_plan_version_params.rb', line 13

required :plan_id, String

#remove_adjustments ⇒ Array<Orb::Models::BetaCreatePlanVersionParams::RemoveAdjustment>?

Adjustments to be removed from the plan.

Parameters:

  • value (::Array[Orb::BetaCreatePlanVersionParams::RemoveAdjustment], nil)

Returns:



41
42
43
# File 'lib/orb/models/beta_create_plan_version_params.rb', line 41

optional :remove_adjustments,
-> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::RemoveAdjustment] },
nil?: true

#remove_prices ⇒ Array<Orb::Models::BetaCreatePlanVersionParams::RemovePrice>?

Prices to be removed from the plan.

Parameters:

  • value (::Array[Orb::BetaCreatePlanVersionParams::RemovePrice], nil)

Returns:



49
50
51
# File 'lib/orb/models/beta_create_plan_version_params.rb', line 49

optional :remove_prices,
-> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::RemovePrice] },
nil?: true

#replace_adjustments ⇒ Array<Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment>?

Adjustments to be replaced with additional adjustments on the plan.

Parameters:

  • value (::Array[Orb::BetaCreatePlanVersionParams::ReplaceAdjustment], nil)

Returns:



57
58
59
# File 'lib/orb/models/beta_create_plan_version_params.rb', line 57

optional :replace_adjustments,
-> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplaceAdjustment] },
nil?: true

#replace_prices ⇒ Array<Orb::Models::BetaCreatePlanVersionParams::ReplacePrice>?

Prices to be replaced with additional prices on the plan.

Parameters:

  • value (::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice], nil)

Returns:



65
66
67
# File 'lib/orb/models/beta_create_plan_version_params.rb', line 65

optional :replace_prices,
-> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice] },
nil?: true

#set_as_default ⇒ Boolean?

Set this new plan version as the default

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


73
# File 'lib/orb/models/beta_create_plan_version_params.rb', line 73

optional :set_as_default, Orb::Internal::Type::Boolean, nil?: true

#version ⇒ Integer

New version number.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


19
# File 'lib/orb/models/beta_create_plan_version_params.rb', line 19

required :version, Integer

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/orb/models/beta_create_plan_version_params.rb', line 334

.variants ⇒ Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount)



# File 'lib/orb/models/beta_create_plan_version_params.rb', line 339

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


52
# File 'sig/orb/models/beta_create_plan_version_params.rbs', line 52

def to_hash: -> {