Class: Orb::Models::PackageConfig

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

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(package_amount:, package_size:) ⇒ PackageConfig

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

Configuration for package pricing

Parameters:

  • package_amount (String)

    A currency amount to rate usage by

  • package_size (Integer)

    An integer amount to represent package size. For example, 1000 here would divide

  • package_amount: (String)
  • package_size: (Integer)


# File 'lib/orb/models/package_config.rb', line 19

Instance Attribute Details

#package_amountString

A currency amount to rate usage by

Parameters:

  • value (String)

Returns:

  • (String)


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

required :package_amount, String

#package_sizeInteger

An integer amount to represent package size. For example, 1000 here would divide usage by 1000 before multiplying by package_amount in rating

Parameters:

  • value (Integer)

Returns:

  • (Integer)


17
# File 'lib/orb/models/package_config.rb', line 17

required :package_size, Integer

Instance Method Details

#to_hash{ package_amount: String, package_size: Integer }

Returns:

  • ({ package_amount: String, package_size: Integer })


12
# File 'sig/orb/models/package_config.rbs', line 12

def to_hash: -> { package_amount: String, package_size: Integer }