Class: Orb::Models::PlanCreateParams

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

Overview

See Also:

  • Orb::Resources::Plans#create

Defined Under Namespace

Modules: Status Classes: Adjustment, PlanPhase, Price

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(unit_rating_key:, default_unit_rate: nil, grouping_key: nil) ⇒ Object

Some parameter documentations has been truncated, see Orb::Models::PlanCreateParams::Price::Price::EventOutput::EventOutputConfig for more details.

Configuration for event_output pricing

Parameters:

  • unit_rating_key (String)

    The key in the event data to extract the unit rate from.

  • default_unit_rate (String, nil) (defaults to: nil)

    If provided, this amount will be used as the unit rate when an event does not ha

  • grouping_key (String, nil) (defaults to: nil)

    An optional key in the event data to group by (e.g., event ID). All events will



# File 'lib/orb/models/plan_create_params.rb', line 2690

Instance Attribute Details

#adjustmentsArray<Orb::Models::PlanCreateParams::Adjustment>?

Adjustments for this plan. If the plan has phases, this includes adjustments across all phases of the plan.

Parameters:

  • value (::Array[Orb::PlanCreateParams::Adjustment], nil)

Returns:



34
35
36
37
38
# File 'lib/orb/models/plan_create_params.rb', line 34

optional :adjustments,
-> {
  Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Adjustment]
},
nil?: true

#currencyString

An ISO 4217 currency string for invoices generated by subscriptions on this plan.

Parameters:

  • value (String)

Returns:

  • (String)


15
# File 'lib/orb/models/plan_create_params.rb', line 15

required :currency, String

#default_invoice_memoString?

Free-form text which is available on the invoice PDF and the Orb invoice portal.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


44
# File 'lib/orb/models/plan_create_params.rb', line 44

optional :default_invoice_memo, String, nil?: true

#descriptionString?

An optional user-defined description of the plan.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


50
# File 'lib/orb/models/plan_create_params.rb', line 50

optional :description, String, nil?: true

#external_plan_idString?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


55
# File 'lib/orb/models/plan_create_params.rb', line 55

optional :external_plan_id, String, nil?: true

#metadataHash{Symbol=>String, nil}?

User-specified key/value pairs for the resource. Individual keys can be removed by setting the value to null, and the entire metadata mapping can be cleared by setting metadata to null.

Parameters:

  • value (::Hash[Symbol, String?], nil)

Returns:

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


63
# File 'lib/orb/models/plan_create_params.rb', line 63

optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true

#nameString

Parameters:

  • value (String)

Returns:

  • (String)


20
# File 'lib/orb/models/plan_create_params.rb', line 20

required :name, String

#net_termsInteger?

The net terms determines the difference between the invoice date and the issue date for the invoice. If you intend the invoice to be due on issue, set this to 0.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


71
# File 'lib/orb/models/plan_create_params.rb', line 71

optional :net_terms, Integer, nil?: true

#plan_phasesArray<Orb::Models::PlanCreateParams::PlanPhase>?

Configuration of pre-defined phases, each with their own prices and adjustments. Leave unspecified for plans with a single phase.

Parameters:

  • value (::Array[Orb::PlanCreateParams::PlanPhase], nil)

Returns:



78
# File 'lib/orb/models/plan_create_params.rb', line 78

optional :plan_phases, -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::PlanPhase] }, nil?: true

#pricesArray<Orb::Models::PlanCreateParams::Price>

Prices for this plan. If the plan has phases, this includes prices across all phases of the plan.

Parameters:

  • value (::Array[Orb::PlanCreateParams::Price])

Returns:



27
# File 'lib/orb/models/plan_create_params.rb', line 27

required :prices, -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price] }

#statusSymbol, ...

The status of the plan to create (either active or draft). If not specified, this defaults to active.

Returns:



85
# File 'lib/orb/models/plan_create_params.rb', line 85

optional :status, enum: -> { Orb::PlanCreateParams::Status }

Instance Method Details

#to_hash{

Returns:

  • ({)


64
# File 'sig/orb/models/plan_create_params.rbs', line 64

def to_hash: -> {