toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      "order_id": orderId,
      "order_date": orderDate,
      "pickup_location": pickupLocation,
      "channel_id": channelId,
      "comment": comment,
      "billing_customer_name": billingCustomerName,
      "billing_last_name": billingLastName,
      "billing_address": billingAddress,
      "billing_address_2": billingAddress2,
      "billing_city": billingCity,
      "billing_pincode": billingPincode,
      "billing_state": billingState,
      "billing_country": billingCountry,
      "billing_email": billingEmail,
      "billing_phone": billingPhone,
      "shipping_is_billing": shippingIsBilling,
      "shipping_customer_name": shippingCustomerName,
      "shipping_last_name": shippingLastName,
      "shipping_address": shippingAddress,
      "shipping_address_2": shippingAddress2,
      "shipping_city": shippingCity,
      "shipping_pincode": shippingPincode,
      "shipping_country": shippingCountry,
      "shipping_state": shippingState,
      "shipping_email": shippingEmail,
      "shipping_phone": shippingPhone,
      "order_items": orderItems == null
          ? null
          : List<dynamic>.from(orderItems!.map((x) => x.toJson())),
      "payment_method": paymentMethod,
      "shipping_charges": shippingCharges,
      "giftwrap_charges": giftwrapCharges,
      "transaction_charges": transactionCharges,
      "total_discount": totalDiscount,
      "sub_total": subTotal,
      "length": length,
      "breadth": breadth,
      "height": height,
      "weight": weight,
    };