Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #77 from sunznx/feature/add-order_number
Browse files Browse the repository at this point in the history
feat: add `order_number, order_date` for tracking API
  • Loading branch information
Bossa573 authored May 7, 2022
2 parents 08a700a + 81eb5b0 commit 76c8b9f
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 2 deletions.
4 changes: 4 additions & 0 deletions __tests__/test_tracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ describe("Tracking", function () {
"note": null,
"order_id": null,
"order_id_path": null,
"order_date": null,
"order_number": null,
"origin_country_iso3": "USA",
"shipment_package_count": 1,
"shipment_pickup_date": "2018-07-31T06:00:00",
Expand Down Expand Up @@ -228,6 +230,8 @@ describe("Tracking", function () {
"note": null,
"order_id": null,
"order_id_path": null,
"order_date": null,
"order_number": null,
"origin_country_iso3": "USA",
"shipment_package_count": 1,
"shipment_pickup_date": "2018-07-31T06:00:00",
Expand Down
3 changes: 2 additions & 1 deletion src/endpoint/tracking_endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ export interface TrackingEndpoint {
/**
* Update a tracking.
* tracking_update_params to include: smses, emails,title,customer_name,order_id,
* order_id_path,custom_fields,note,language,order_promised_delivery_date,delivery_type,pickup_location,pickup_note
* order_id_path,order_number,order_date,custom_fields,note,language,
* order_promised_delivery_date,delivery_type,pickup_location,pickup_note
* @param single_tracking_param The param to identify the single tracking.
* @param tracking_update_params Tracking update params object
*/
Expand Down
3 changes: 2 additions & 1 deletion src/implementation/tracking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ export class TrackingImplementation implements TrackingEndpoint {
/**
* Update a tracking.
* tracking_update_params to include: smses, emails,title,customer_name,order_id,
* order_id_path,custom_fields,note,language,order_promised_delivery_date,delivery_type,pickup_location,pickup_note
* order_id_path,order_number,order_date,custom_fields,note,language,
* order_promised_delivery_date,delivery_type,pickup_location,pickup_note
* @param single_tracking_param The param to identify the single tracking.
* @param tracking_update_params Tracking update params object
*/
Expand Down
10 changes: 10 additions & 0 deletions src/model/tracking/tracking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,16 @@ export interface Tracking {
*/
order_id_path?: string;

/**
* Text field for order number
*/
order_number?: string;

/**
* Date and time of the order created
*/
order_date?: string;

/**
* Origin country of the tracking. ISO Alpha-3 (three letters).
*/
Expand Down
10 changes: 10 additions & 0 deletions src/model/tracking/tracking_create_params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,16 @@ export interface TrackingCreate {
*/
order_id_path?: string;

/**
* Text field for order number
*/
order_number?: string;

/**
* Date and time of the order created
*/
order_date?: string;

/**
* Custom fields that accept a hash with string, boolean or number fields
*/
Expand Down
10 changes: 10 additions & 0 deletions src/model/tracking/tracking_update_params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ interface TrackingUpdate {
*/
order_id_path?: string;

/**
* Text field for order number
*/
order_number?: string;

/**
* Date and time of the order created
*/
order_date?: string;

/**
* Custom fields that accept a hash with string, boolean or number fields
*/
Expand Down

0 comments on commit 76c8b9f

Please sign in to comment.