Payment.fromJson constructor

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

Implementation

factory Payment.fromJson(Map<String, dynamic> json) => Payment(
    id: json["id"],
    subscriberId: json["subscriberId"],
    bookingId: json["bookingId"],
    amount: json["amount"],
    vat: json["vat"],
    vatAmount: json["vat_amount"],
    fee: json["fee"],
    feeAmount: json["fee_amount"],
    totalAmount: json["total_amount"],
    amountToPay: json["amount_to_pay"],
    currency: json["currency"],
    currenyToPay: json["curreny_to_pay"],
    type: json["type"],
    purpose: json["purpose"],
    status: json["status"],
    paymentAddress: json["paymentAddress"],
    transactionId: json["transactionId"],
    transactionHash: json["transactionHash"],
    invoiceUrl: json["invoice_url"],
    meta: json["meta"],
    provider: json["provider"],
    paymentDate: json["paymentDate"],
    additionalData: json["additional_data"],
    receiptUrl: json["receipt_url"],
    comment: json["comment"],
    reference: json["reference"],
    createdAt: json["createdAt"] == null ? null : DateTime.parse(json["createdAt"]),
    updatedAt: json["updatedAt"] == null ? null : DateTime.parse(json["updatedAt"]),
);