PaymentPagesCheckoutSessionCurrencyConversion.fromJson constructor

PaymentPagesCheckoutSessionCurrencyConversion.fromJson(
  1. Object? json
)

Implementation

factory PaymentPagesCheckoutSessionCurrencyConversion.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentPagesCheckoutSessionCurrencyConversion(
    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),
  );
}