Class: Orb::Models::NewMinimum

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

Defined Under Namespace

Modules: AdjustmentType, AppliesToAll, PriceType 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(adjustment_type:, item_id:, minimum_amount:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil) ⇒ Object

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

Parameters:

  • adjustment_type (Symbol, Orb::Models::NewMinimum::AdjustmentType)
  • item_id (String)

    The item ID that revenue from this minimum will be attributed to.

  • minimum_amount (String)
  • applies_to_all (Boolean, Orb::Models::NewMinimum::AppliesToAll, nil) (defaults to: nil)

    If set, the adjustment will apply to every price on the subscription.

  • applies_to_item_ids (Array<String>, nil) (defaults to: nil)

    The set of item IDs to which this adjustment applies.

  • applies_to_price_ids (Array<String>, nil) (defaults to: nil)

    The set of price IDs to which this adjustment applies.

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

    If set, only prices in the specified currency will have the adjustment applied.

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

    A list of filters that determine which prices this adjustment will apply to.

  • is_invoice_level (Boolean) (defaults to: nil)

    When false, this adjustment will be applied to a single price. Otherwise, it wil

  • price_type (Symbol, Orb::Models::NewMinimum::PriceType, nil) (defaults to: nil)

    If set, only prices of the specified type will have the adjustment applied.



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

Instance Attribute Details

#adjustment_typeSymbol, Orb::Models::NewMinimum::AdjustmentType

Parameters:

  • value (Orb::Models::NewMinimum::adjustment_type)

Returns:



9
# File 'lib/orb/models/new_minimum.rb', line 9

required :adjustment_type, enum: -> { Orb::NewMinimum::AdjustmentType }

#applies_to_allBoolean, ...

If set, the adjustment will apply to every price on the subscription.

Parameters:

  • value (Orb::Models::NewMinimum::applies_to_all, nil)

Returns:



26
# File 'lib/orb/models/new_minimum.rb', line 26

optional :applies_to_all, enum: -> { Orb::NewMinimum::AppliesToAll }, nil?: true

#applies_to_item_idsArray<String>?

The set of item IDs to which this adjustment applies.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


32
# File 'lib/orb/models/new_minimum.rb', line 32

optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true

#applies_to_price_idsArray<String>?

The set of price IDs to which this adjustment applies.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


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

optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true

#currencyString?

If set, only prices in the specified currency will have the adjustment applied.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :currency, String, nil?: true

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

A list of filters that determine which prices this adjustment will apply to.

Parameters:

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

Returns:



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

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

#is_invoice_levelBoolean?

When false, this adjustment will be applied to a single price. Otherwise, it will be applied at the invoice level, possibly to multiple prices.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


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

optional :is_invoice_level, Orb::Internal::Type::Boolean

#item_idString

The item ID that revenue from this minimum will be attributed to.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :item_id, String

#minimum_amountString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :minimum_amount, String

#price_typeSymbol, ...

If set, only prices of the specified type will have the adjustment applied.

Parameters:

  • value (Orb::Models::NewMinimum::price_type, nil)

Returns:



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

optional :price_type, enum: -> { Orb::NewMinimum::PriceType }, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/orb/models/new_minimum.rb', line 95

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {