Class: Moonbase::Models::MonetaryValue::Data

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/moonbase/models/monetary_value.rb

Overview

See Also:

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(currency:, in_minor_units:) ⇒ Object

Some parameter documentations has been truncated, see Moonbase::Models::MonetaryValue::Data for more details.

A monetary amount is composed of the amount in the smallest unit of a currency and an ISO currency code.

Parameters:

  • currency (String)

    The 3-letter ISO 4217 currency code

  • in_minor_units (Integer)

    The amount in the minor units of the currency. For example, $10 (10 USD) would b



# File 'lib/moonbase/models/monetary_value.rb', line 43

Instance Attribute Details

#currencyString

The 3-letter ISO 4217 currency code

Returns:

  • (String)


34
# File 'lib/moonbase/models/monetary_value.rb', line 34

required :currency, String

#in_minor_unitsInteger

The amount in the minor units of the currency. For example, $10 (10 USD) would be 1000. Minor units conversion depends on the currency.

Returns:

  • (Integer)


41
# File 'lib/moonbase/models/monetary_value.rb', line 41

required :in_minor_units, Integer