Class: Orb::Models::NewAllocationPrice

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/new_allocation_price.rb

Defined Under Namespace

Modules: Cadence

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(amount: , cadence: , currency: , custom_expiration: nil, expires_at_end_of_cadence: nil) ⇒ Object

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

Parameters:

  • amount (String) (defaults to: )

    An amount of the currency to allocate to the customer at the specified cadence.

  • cadence (Symbol, Orb::Models::NewAllocationPrice::Cadence) (defaults to: )

    The cadence at which to allocate the amount to the customer.

  • currency (String) (defaults to: )

    An ISO 4217 currency string or a custom pricing unit identifier in which to bill

  • custom_expiration (Orb::Models::CustomExpiration, nil) (defaults to: nil)

    The custom expiration for the allocation.

  • expires_at_end_of_cadence (Boolean, nil) (defaults to: nil)

    Whether the allocated amount should expire at the end of the cadence or roll ove



# File 'lib/orb/models/new_allocation_price.rb', line 38

Instance Attribute Details

#amountString

An amount of the currency to allocate to the customer at the specified cadence.

Returns:

  • (String)


10
# File 'lib/orb/models/new_allocation_price.rb', line 10

required :amount, String

#cadenceSymbol, Orb::Models::NewAllocationPrice::Cadence

The cadence at which to allocate the amount to the customer.



16
# File 'lib/orb/models/new_allocation_price.rb', line 16

required :cadence, enum: -> { Orb::NewAllocationPrice::Cadence }

#currencyString

An ISO 4217 currency string or a custom pricing unit identifier in which to bill this price.

Returns:

  • (String)


23
# File 'lib/orb/models/new_allocation_price.rb', line 23

required :currency, String

#custom_expirationOrb::Models::CustomExpiration?

The custom expiration for the allocation.



29
# File 'lib/orb/models/new_allocation_price.rb', line 29

optional :custom_expiration, -> { Orb::CustomExpiration }, nil?: true

#expires_at_end_of_cadenceBoolean?

Whether the allocated amount should expire at the end of the cadence or roll over to the next period. Set to null if using custom_expiration.

Returns:

  • (Boolean, nil)


36
# File 'lib/orb/models/new_allocation_price.rb', line 36

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