Class: Privy::Models::FiatOnrampSource

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/privy/models/fiat_onramp_source.rb,
sig/privy/models/fiat_onramp_source.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(amount:, asset:) ⇒ FiatOnrampSource

Source currency details for a fiat onramp quote request.

Parameters:

  • amount (String)

    A positive decimal amount as a string (e.g. "100", "50.25", "0.001").

  • asset (String)

    ISO 4217 fiat currency code. Three uppercase ASCII letters.

  • amount: (String)
  • asset: (String)


# File 'lib/privy/models/fiat_onramp_source.rb', line 18

Instance Attribute Details

#amountString

A positive decimal amount as a string (e.g. "100", "50.25", "0.001").

Parameters:

  • value (String)

Returns:

  • (String)


10
# File 'lib/privy/models/fiat_onramp_source.rb', line 10

required :amount, String

#assetString

ISO 4217 fiat currency code. Three uppercase ASCII letters.

Parameters:

  • value (String)

Returns:

  • (String)


16
# File 'lib/privy/models/fiat_onramp_source.rb', line 16

required :asset, String

Instance Method Details

#to_hash{ amount: String, asset: String }

Returns:

  • ({ amount: String, asset: String })


12
# File 'sig/privy/models/fiat_onramp_source.rbs', line 12

def to_hash: -> { amount: String, asset: String }