CheckoutSessionCurrencyConversion.fromJson constructor

CheckoutSessionCurrencyConversion.fromJson(
  1. Object? json
)

Implementation

factory CheckoutSessionCurrencyConversion.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return CheckoutSessionCurrencyConversion(
    amountSubtotal: (map['amount_subtotal'] as num).toInt(),
    amountTotal: (map['amount_total'] as num).toInt(),
    fxRate: (map['fx_rate'] as String),
    sourceCurrency: (map['source_currency'] as String),
  );
}