SuccessfulPayment.fromJson constructor

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

Creates a SuccessfulPayment object from a JSON object

Implementation

factory SuccessfulPayment.fromJson(Map<String, dynamic> json) {
  return SuccessfulPayment(
    currency: json['currency']!,
    totalAmount: json['total_amount']!,
    invoicePayload: json['invoice_payload']!,
    shippingOptionId: json['shipping_option_id'],
    orderInfo: json['order_info'] != null
        ? OrderInfo.fromJson(json['order_info']!)
        : null,
    telegramPaymentChargeId: json['telegram_payment_charge_id']!,
    providerPaymentChargeId: json['provider_payment_charge_id']!,
  );
}