toJson method

  1. @override
Map<String, dynamic> toJson()

Implementation

@override
Map<String, dynamic> toJson() {
  final data = <String, dynamic>{};
  data.addAll(super.toJson());
  data['price'] = price;
  data['paidPrice'] = paidPrice;
  if (installment != null) data['installment'] = installment;
  if (paymentChannel != null) data['paymentChannel'] = paymentChannel;
  if (basketId != null) data['basketId'] = basketId;
  if (paymentGroup != null) data['paymentGroup'] = paymentGroup;
  if (paymentCard != null) {
    data['paymentCard'] = paymentCard!.toJson();
  }
  data['buyer'] = buyer.toJson();
  data['shippingAddress'] = shippingAddress.toJson();
  data['billingAddress'] = billingAddress.toJson();
  final v = basketItems;
  final arr0 = [];
  v.forEach((v) {
    arr0.add(v.toJson());
  });
  data['basketItems'] = arr0;
  if (currency != null) data['currency'] = currency;
  data['callbackUrl'] = callbackUrl;
  data['enabledInstallments'] = enabledInstallments;
  return data;
}