Package com.dzidzi.dto.order
Class Order
java.lang.Object
com.dzidzi.dto.merge.EntityId
com.dzidzi.dto.order.OrderEntityApi
com.dzidzi.dto.order.Order
Represents an order in the Api.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionOrder(UUID id, long orderDate, OrderStatus status, BigDecimal totalOrderPrice, BigDecimal vat, BigDecimal discount, BigDecimal deliveryFee, BigDecimal totalAmountToPay, String orderNumber, String orderNote, EntityComposition user, EntityComposition courier, RestaurantEntityApi restaurant, AddressEntityApi address, CouponEntityApi coupon, long deliveryDate, List<OrderItemEntityApi> orderItems) -
Method Summary
Modifier and TypeMethodDescriptionstatic Order.Builderbuilder()TheAddresswhere the order was delivered toThe coupon usedTheCourierwho the order is assigned to.longThe delivery dateThe delivery feeThe discountTheOrderItem'sTheRestaurantwho the order is assigned to.The total amount of the order to payThe total items pricegetUser()TheUserwho made the ordergetVat()The vat of the ordervoidsetAddress(AddressEntityApi address) TheAddresswhere the order was delivered tovoidsetCoupon(CouponEntityApi coupon) The coupon usedvoidsetCourier(EntityComposition courier) TheCourierwho the order is assigned to.voidsetOrderItems(List<OrderItemEntityApi> orderItems) TheOrderItem'svoidsetRestaurant(RestaurantEntityApi restaurant) TheRestaurantwho the order is assigned to.voidsetUser(EntityComposition user) TheUserwho made the ordervoidsetVat(BigDecimal vat) The vat of the orderMethods inherited from class com.dzidzi.dto.order.OrderEntityApi
getOrderDate, getOrderNote, getOrderNumber, getStatus
-
Constructor Details
-
Order
public Order(UUID id, long orderDate, OrderStatus status, BigDecimal totalOrderPrice, BigDecimal vat, BigDecimal discount, BigDecimal deliveryFee, BigDecimal totalAmountToPay, String orderNumber, String orderNote, EntityComposition user, EntityComposition courier, RestaurantEntityApi restaurant, AddressEntityApi address, CouponEntityApi coupon, long deliveryDate, List<OrderItemEntityApi> orderItems)
-
-
Method Details
-
builder
-
getTotalOrderPrice
The total items price -
getVat
The vat of the order -
getDiscount
The discount -
getDeliveryFee
The delivery fee -
getTotalAmountToPay
The total amount of the order to pay -
getUser
TheUserwho made the order -
getCourier
TheCourierwho the order is assigned to. -
getRestaurant
TheRestaurantwho the order is assigned to. -
getAddress
TheAddresswhere the order was delivered to -
getCoupon
The coupon used -
getDeliveryDate
public long getDeliveryDate()The delivery date -
getOrderItems
TheOrderItem's -
setVat
The vat of the order -
setUser
TheUserwho made the order -
setCourier
TheCourierwho the order is assigned to. -
setRestaurant
TheRestaurantwho the order is assigned to. -
setAddress
TheAddresswhere the order was delivered to -
setCoupon
The coupon used -
setOrderItems
TheOrderItem's
-