Private Readonly_Private Static ReadonlyFREE_Private Static ReadonlySHIPPING_Private_Generates a fake track & trace code. starting with "TT".
A random track & trace string.
Private_Calculates an estimated delivery date 3 business days from now.
A date string in Dutch format.
Calculates the shipping cost based on the order total. Orders above €50 get free shipping.
The total price of the order.
The shipping cost and total including shipping.
Creates a fake delivery for a user and returns a track & trace code. Also sends a track & trace email to the customer.
The ID of the user placing the order.
The total price of the order.
A DeliveryResult with track & trace and cost details.
Retrieves all deliveries for a given user, ordered by creation date descending.
The ID of the user.
An array of UserDelivery objects.
Sends a fake track & trace email to the customer (logs to console).
The customer's email address.
The track & trace code.
The estimated delivery date.
Service responsible for handling shipping logic. Calculates shipping costs, creates fake deliveries and sends fake track & trace emails.
File
apps/api/src/services/ShippingService.ts