Skip to main content

Class: ShipmentManager

Extends

Constructors

Constructor

new ShipmentManager(transport, defaultFormat?): ShipmentManager

Parameters

ParameterTypeDefault value
transportTransportundefined
defaultFormatResponseFormat'raw'

Returns

ShipmentManager

Inherited from

BaseManager.constructor

Methods

get()

get(id, includeContainers?, options?): Promise<any>

Parameters

ParameterTypeDefault value
idstringundefined
includeContainersbooleantrue
options?CallOptions & objectundefined

Returns

Promise<any>

iterate()

iterate(filters?, options?): AsyncGenerator<Shipment, void, unknown>

Parameters

ParameterType
filters{ carrier?: string; include?: IncludeParam<ShipmentInclude>; includeContainers?: boolean; number?: string; port?: string; status?: string; trackingStopped?: boolean; updatedAfter?: string; } | undefined
options?Omit<ListOptions, "page">

Returns

AsyncGenerator<Shipment, void, unknown>

list()

list(filters?, options?): Promise<any>

Parameters

ParameterTypeDescription
filters{ carrier?: string; include?: IncludeParam<ShipmentInclude>; includeContainers?: boolean; number?: string; port?: string; status?: string; trackingStopped?: boolean; updatedAfter?: string; }-
filters.carrier?string-
filters.include?IncludeParam<ShipmentInclude>-
filters.includeContainers?boolean-
filters.number?stringSearch shipments by the original tracking request_number.
filters.port?string-
filters.status?string-
filters.trackingStopped?booleanFilter shipments by whether they are still tracking. Maps to the supported filter[tracking_stopped].
filters.updatedAfter?string-
options?ListOptions-

Returns

Promise<any>

resumeTracking()

resumeTracking(id, options?): Promise<any>

Parameters

ParameterType
idstring
options?CallOptions

Returns

Promise<any>

stopTracking()

stopTracking(id, options?): Promise<any>

Parameters

ParameterType
idstring
options?CallOptions

Returns

Promise<any>

update()

update(id, attrs, options?): Promise<any>

Parameters

ParameterType
idstring
attrsRecord<string, any>
options?CallOptions

Returns

Promise<any>