Class: Orb::Models::NewAllocationPrice

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

Defined Under Namespace

Modules: Cadence Classes: Filter

Instance Attribute Summary collapse

Class Method 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, filters: nil, item_id: nil, license_type_id: nil, metadata: nil, per_unit_cost_basis: nil) ⇒ Object

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

Parameters:

  • amount (String)

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

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

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

  • currency (String)

    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

  • filters (Array<Orb::Models::NewAllocationPrice::Filter>, nil) (defaults to: nil)

    The filters that determine which items the allocation applies to.

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

    The item ID that line items representing charges for this allocation will be ass

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

    The license type ID to associate the price with license allocation.

  • metadata (Hash{Symbol=>String, nil}, nil) (defaults to: nil)

    User-specified key/value pairs for the resource. Individual keys can be removed

  • per_unit_cost_basis (String) (defaults to: nil)

    The (per-unit) cost basis of each created block. If non-zero, a customer will be



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

Instance Attribute Details

#amountString

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

Parameters:

  • value (String)

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.

Parameters:

  • value (Orb::Models::NewAllocationPrice::cadence)

Returns:



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.

Parameters:

  • value (String)

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.

Parameters:

Returns:



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.

Parameters:

  • value (Boolean, nil)

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

#filtersArray<Orb::Models::NewAllocationPrice::Filter>?

The filters that determine which items the allocation applies to.

Parameters:

  • value (::Array[Orb::NewAllocationPrice::Filter], nil)

Returns:



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

optional :filters, -> { Orb::Internal::Type::ArrayOf[Orb::NewAllocationPrice::Filter] }, nil?: true

#item_idString?

The item ID that line items representing charges for this allocation will be associated with. If not provided, the default allocation item for the currency will be used (e.g. 'Included Allocation (USD)').

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :item_id, String, nil?: true

#license_type_idString?

The license type ID to associate the price with license allocation.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :license_type_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)


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

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

#per_unit_cost_basisString?

The (per-unit) cost basis of each created block. If non-zero, a customer will be invoiced according to the quantity and per unit cost basis specified for the allocation each cadence.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :per_unit_cost_basis, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash{

Returns:

  • ({)


53
# File 'sig/orb/models/new_allocation_price.rbs', line 53

def to_hash: -> {