toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      "auth_token": authToken ?? authToken,
      "delivery_needed": deliveryNeeded ?? deliveryNeeded,
      "amount_cents": amountCents ?? amountCents,
      "currency": currency ?? currency,
      // "merchant_order_id": merchantOrderId ?? merchantOrderId,
      "items": items == null
          ? null
          : List<dynamic>.from(items!.map((x) => x.toJson())),
      // "shipping_data": shippingData ?? shippingData.toJson(),
      // "shipping_details":
      // shippingDetails ?? shippingDetails.toJson(),
    };