Class: Anthropic::Models::BetaMonetaryAmount
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::BetaMonetaryAmount
- Defined in:
- lib/anthropic/models/beta_monetary_amount.rb,
sig/anthropic/models/beta_monetary_amount.rbs
Instance Attribute Summary collapse
-
#amount ⇒ String
Amount in minor units of the currency, as an integer decimal string with no leading zeros: "2500" is $25.00 and "50" is fifty cents.
-
#currency ⇒ Symbol, Anthropic::Models::BetaCurrency
Uppercase ISO-4217 currency code.
Instance Method Summary collapse
-
#initialize(amount:, currency:) ⇒ Object
constructor
Some parameter documentations has been truncated, see BetaMonetaryAmount for more details.
- #to_hash ⇒ {
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:, currency:) ⇒ Object
Some parameter documentations has been truncated, see Anthropic::Models::BetaMonetaryAmount for more details.
A monetary amount in a specific currency.
|
|
# File 'lib/anthropic/models/beta_monetary_amount.rb', line 22
|
Instance Attribute Details
#amount ⇒ String
Amount in minor units of the currency, as an integer decimal string with no leading zeros: "2500" is $25.00 and "50" is fifty cents. A string rather than a number so no float rounding is ever applied.
12 |
# File 'lib/anthropic/models/beta_monetary_amount.rb', line 12 required :amount, String |
#currency ⇒ Symbol, Anthropic::Models::BetaCurrency
Uppercase ISO-4217 currency code. USD is the only currency currently
supported; the accepted set is closed and grows only when a new currency is
priced.
20 |
# File 'lib/anthropic/models/beta_monetary_amount.rb', line 20 required :currency, enum: -> { Anthropic::BetaCurrency } |
Instance Method Details
#to_hash ⇒ {
16 |
# File 'sig/anthropic/models/beta_monetary_amount.rbs', line 16
def to_hash: -> {
|