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

Overview

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

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, #initialize, 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

This class inherits a constructor from Orb::Internal::Type::BaseModel

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.



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.

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.

Returns:

  • (String, nil)


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

optional :default_invoice_memo, String, nil?: true

#external_plan_idString?

Returns:

  • (String, nil)


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

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`.

Returns:

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


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

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

#nameString

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.

Returns:

  • (Integer, nil)


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

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.



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

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.



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:



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

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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

.variantsArray(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)



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