shipping.Class.ShippingService - typedoc2md/typedoc-plugin-markdown-examples GitHub Wiki

github-wiki-example / shipping / ShippingService

Class: ShippingService

Defined in: shipping.ts:39

Service for managing shipping records. Provides methods to handle the logistics of order shipments, including recording and tracking shipments.

Constructors

Constructor

new ShippingService(): ShippingService

Returns

ShippingService

Methods

getAllShipments()

getAllShipments(): ShippingRecord[]

Defined in: shipping.ts:61

Retrieves all shipping records managed by the service. Useful for tracking, auditing, and providing customers with updates on their shipment statuses.

Returns

ShippingRecord[]

An array of all shipping records.


shipOrder()

shipOrder(shipment): ShippingRecord

Defined in: shipping.ts:51

Ships an order by creating a shipping record and adding it to the list of shipments. This method simulates the action of shipping an order in a real-world scenario.

Parameters

Parameter Type Description
shipment ShippingRecord The shipment record to be added.

Returns

ShippingRecord

The shipment record that was added to the shipments list.