-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Problem
Aftership tracking API return null when a property is not defined. However, the typescript response model is defined with an optional value, but not nullable.
I tested it with getTrackingById API, looking for latest_estimated_delivery property for example. The model says
export interface GetTrackingByIdResponse {
// ...
latest_estimated_delivery?: LatestEstimatedDeliveryGetTrackingByIdResponse;
}but It seems to be more like:
export interface GetTrackingByIdResponse {
// ...
latest_estimated_delivery: LatestEstimatedDeliveryGetTrackingByIdResponse | null;
}-> value can be null and was never undefined in my tests.
Can I assume the value will always be defined (with null value when undefined in Aftership)? Is there a reason for having this response signature?
Thanks in advance.
f19yd
Metadata
Metadata
Assignees
Labels
No labels