MFSendPaymentRequest.fromJson constructor

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

Implementation

MFSendPaymentRequest.fromJson(Map<String, dynamic> json) {
  customerName = json['CustomerName'];
  notificationOption = json['NotificationOption'];
  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));
  //   });
  // }
}