PlaceOrderRequest

@Serializable
@SerialName(value = "PlaceOrderRequest")
data class PlaceOrderRequest(val restaurantId: String, val customerId: String = "", val items: List<OrderItemDto>, val orderType: OrderType, val estimatedDeliveryTime: String? = null, val deliveryAddress: String? = null, val bellName: String? = null, val customerPhone: String? = null, val pickupTime: String? = null, val customerName: String? = null, val tableNumber: Int? = null, val numberOfGuests: Int? = null) : AuthenticatedRequest<PlaceOrderRequest> , JsonEncodable

Request data class for placing an order with various order types (Delivery, Takeaway, DineIn).

Parameters

restaurantId

The unique identifier of the restaurant where the order is being placed.

customerId

The unique identifier of the customer placing the order.

items

The list of order items being ordered.

orderType

The type of the order (Delivery, Takeaway, DineIn).

estimatedDeliveryTime

The estimated delivery time for Delivery orders (optional).

deliveryAddress

The delivery address for Delivery orders (optional).

bellName

The name on the doorbell for Delivery orders (optional).

customerPhone

The phone number of the customer for Delivery orders (optional).

pickupTime

The pickup time for Takeaway orders (optional).

customerName

The name of the customer for Takeaway orders (optional).

tableNumber

The table number for DineIn orders (optional).

numberOfGuests

The number of guests for DineIn orders (optional).

Constructors

Link copied to clipboard
constructor(restaurantId: String, customerId: String = "", items: List<OrderItemDto>, orderType: OrderType, estimatedDeliveryTime: String? = null, deliveryAddress: String? = null, bellName: String? = null, customerPhone: String? = null, pickupTime: String? = null, customerName: String? = null, tableNumber: Int? = null, numberOfGuests: Int? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun addId(userId: String): PlaceOrderRequest
Link copied to clipboard
open override fun toJson(): String