Payment.fromJson constructor
Payment.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Payment.fromJson(Map<String, dynamic> json) => Payment(
id: json["id"],
amount: json["amount"].toDouble(),
originalAmount: json["original_amount"],
isPartial: json["is_partial"],
currencyCode: json["currency_code"],
countryCode: json["country_code"],
status: json["status"],
description: json["description"],
merchantReferenceId: json["merchant_reference_id"],
customerToken: json["customer_token"],
paymentMethod: json["payment_method"],
expiration: json["expiration"],
captured: json["captured"],
refunded: json["refunded"],
refundedAmount: json["refunded_amount"],
receiptEmail: json["receipt_email"],
redirectUrl: json["redirect_url"],
completePaymentUrl: json["complete_payment_url"],
errorPaymentUrl: json["error_payment_url"],
receiptNumber: json["receipt_number"],
flowType: json["flow_type"],
address: json["address"],
statementDescriptor: json["statement_descriptor"],
transactionId: json["transaction_id"],
createdAt: json["created_at"],
updatedAt: json["updated_at"],
metadata: CheckoutMetadata.fromJson(json["metadata"]),
failureCode: json["failure_code"],
failureMessage: json["failure_message"],
paid: json["paid"],
paidAt: json["paid_at"],
);