fromJson static method

OnRampPaymentQuote? fromJson(
  1. Map<String, dynamic>? json
)

Implementation

static OnRampPaymentQuote? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return OnRampPaymentQuote(
    paymentMethod: (json['payment_method'] as String?) ?? '',
    expirationDate: (json['expiration_date'] as int?) ?? 0,
    baseCurrencyAmount: (json['base_currency_amount'] as String?) ?? '',
    cryptocurrencyAmount: (json['cryptocurrency_amount'] as String?) ?? '',
    cryptocurrencyPrice: (json['cryptocurrency_price'] as String?) ?? '',
    feeAmount: (json['fee_amount'] as String?) ?? '',
    extraFeeAmount: (json['extra_fee_amount'] as String?) ?? '',
    networkFeeAmount: (json['network_fee_amount'] as String?) ?? '',
    totalAmount: (json['total_amount'] as String?) ?? '',
  );
}