package cart

type CartDetail struct {
	ID                 string             `json:"id"`
	CartID             string             `json:"cartId"`
	OrderItems         []OrderItem        `json:"orderItems"`
	GeneralInformation GeneralInformation `json:"generalInformation"`
	DeliveryDetails    DeliveryDetails    `json:"deliveryDetails"`
}

type OrderItem struct {
	ID              string  `json:"id"`
	ItemID          string  `json:"itemId"`
	ItemPostId      string  `json:"itemPostId"`
	ItemName        string  `json:"itemName"`
	ItemCode        string  `json:"itemCode"`
	ItemPrice       float64 `json:"itemPrice"`
	ItemQuantity    int64   `json:"itemQuantity"`
	ItemSubTotal    float64 `json:"itemSubTotal"`
	ShippingGroupID *string `json:"shippingGroupId"`
}

type GeneralInformation struct {
	SellerID            string `json:"sellerId"`
	PageName            string `json:"pageName"`
	CustomerID          string `json:"customerId"`
	CustomerName        string `json:"customerName"`
	CustomerEmail       string `json:"customerEmail"`
	CustomerPhoneNumber string `json:"customerPhoneNumber"`
}

type DeliveryDetails struct {
	DeliveryOptionID    string  `json:"deliveryOptionId"`
	DeliveryOption      string  `json:"deliveryOption"`
	DeliveryAddress     string  `json:"deliveryAddress"`
	DeliverySurcharge   float64 `json:"deliverySurcharge"`   // Delivery surcharge
	DeliveryInstruction string  `json:"deliveryInstruction"` // optional
	PostalCode          string  `json:"postalCode"`
	Recipient           string  `json:"recipient"`    // Recipient is the name of the person who will receive the order.
	AddressIDRef        string  `json:"addressIdRef"` // address id reference
}
