v1FiatOnRampCryptoCurrencyFromJson function

v1FiatOnRampCryptoCurrency v1FiatOnRampCryptoCurrencyFromJson(
  1. dynamic value
)

Implementation

v1FiatOnRampCryptoCurrency v1FiatOnRampCryptoCurrencyFromJson(dynamic value) {
  switch (value) {
    case 'FIAT_ON_RAMP_CRYPTO_CURRENCY_UNSPECIFIED':
      return v1FiatOnRampCryptoCurrency
          .fiat_on_ramp_crypto_currency_unspecified;
    case 'FIAT_ON_RAMP_CRYPTO_CURRENCY_BTC':
      return v1FiatOnRampCryptoCurrency.fiat_on_ramp_crypto_currency_btc;
    case 'FIAT_ON_RAMP_CRYPTO_CURRENCY_ETH':
      return v1FiatOnRampCryptoCurrency.fiat_on_ramp_crypto_currency_eth;
    case 'FIAT_ON_RAMP_CRYPTO_CURRENCY_SOL':
      return v1FiatOnRampCryptoCurrency.fiat_on_ramp_crypto_currency_sol;
    case 'FIAT_ON_RAMP_CRYPTO_CURRENCY_USDC':
      return v1FiatOnRampCryptoCurrency.fiat_on_ramp_crypto_currency_usdc;
    default:
      throw ArgumentError('Unknown v1FiatOnRampCryptoCurrency: $value');
  }
}