toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
  'storeId': storeId,
  'paymentId': paymentId,
  'orderName': orderName,
  'totalAmount': totalAmount,
  'currency': currency.toJson(),
  'payMethod': payMethod.toJson(),
  if (channelKey != null) 'channelKey': channelKey!,
  if (channelGroupId != null) 'channelGroupId': channelGroupId!,
  if (taxFreeAmount != null) 'taxFreeAmount': taxFreeAmount!,
  if (vatAmount != null) 'vatAmount': vatAmount!,
  if (customer != null) 'customer': customer!.toJson(),
  if (windowType != null) 'windowType': windowType!.toJson(),
  if (forceRedirect != null) 'forceRedirect': forceRedirect!,
  if (noticeUrls != null) 'noticeUrls': noticeUrls!,
  if (confirmUrl != null) 'confirmUrl': confirmUrl!,
  'appScheme': appScheme,
  if (isEscrow != null) 'isEscrow': isEscrow!,
  if (products != null) 'products': products!.map((e) => e.toJson()).toList(),
  if (isCulturalExpense != null) 'isCulturalExpense': isCulturalExpense!,
  if (locale != null) 'locale': locale!.toJson(),
  if (customData != null) 'customData': customData!,
  if (country != null) 'country': country!.toJson(),
  if (productType != null) 'productType': productType!.toJson(),
  if (offerPeriod != null) 'offerPeriod': offerPeriod!.toJson(),
  if (storeDetails != null) 'storeDetails': storeDetails!.toJson(),
  if (shippingAddress != null) 'shippingAddress': shippingAddress!.toJson(),
  if (promotionId != null) 'promotionId': promotionId!,
  if (popup != null) 'popup': popup!.toJson(),
  if (iframe != null) 'iframe': iframe!.toJson(),
  if (bypass != null) 'bypass': bypass!.toJson(),
  if (card != null) 'card': card!.toJson(),
  if (virtualAccount != null) 'virtualAccount': virtualAccount!.toJson(),
  if (transfer != null) 'transfer': transfer!.toJson(),
  if (mobile != null) 'mobile': mobile!.toJson(),
  if (giftCertificate != null) 'giftCertificate': giftCertificate!.toJson(),
  if (easyPay != null) 'easyPay': easyPay!.toJson(),
  if (paypal != null) 'paypal': paypal!.toJson(),
  if (alipay != null) 'alipay': alipay!.toJson(),
  if (convenienceStore != null)
    'convenienceStore': convenienceStore!.toJson(),
};