MFExecutePaymentRequest.fromJson constructor

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

Implementation

MFExecutePaymentRequest.fromJson(Map<String, dynamic> json) {
  paymentMethodId = json['PaymentMethodId'];
  sessionId = json['SessionId'];
  recurringModel = json['RecurringModel'] != null
      ? MFRecurringModel.fromJson(json['RecurringModel'])
      : null;
  customerName = json['CustomerName'];
  displayCurrencyIso = json['DisplayCurrencyIso'];
  mobileCountryCode = json['MobileCountryCode'];
  customerMobile = json['CustomerMobile'];
  customerEmail = json['CustomerEmail'];
  invoiceValue = json['InvoiceValue'];
  language = json['Language'];
  customerReference = json['CustomerReference'];
  customerCivilId = json['CustomerCivilId'];
  userDefinedField = json['UserDefinedField'];
  customerAddress = json['CustomerAddress'] != null
      ? MFCustomerAddres.fromJson(json['CustomerAddress'])
      : null;
  expiryDate = json['ExpiryDate'];
  if (json['InvoiceItems'] != null) {
    invoiceItems = <MFInvoiceItem>[];
    json['InvoiceItems'].forEach((v) {
      invoiceItems!.add(MFInvoiceItem.fromJson(v));
    });
  }
  // shippingMethod = json['ShippingMethod'];
  // shippingConsignee = json['ShippingConsignee'] != null
  //     ? MFShippingConsignee.fromJson(json['ShippingConsignee'])
  //     : null;
  if (json['Suppliers'] != null) {
    suppliers = <MFSupplier>[];
    json['Suppliers'].forEach((v) {
      suppliers!.add(MFSupplier.fromJson(v));
    });
    processingDetails = json['ProcessingDetails'];
  }
}