@shipengine/js-api 2.5.2 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/funding-sources/types.d.ts +9 -0
- package/index.js +11 -0
- package/index.mjs +11 -0
- package/package.json +1 -1
- package/shipments/api.d.ts +9 -0
|
@@ -14,6 +14,7 @@ export type CreateFundingSource = {
|
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
export type FundingSource = {
|
|
17
|
+
billingInfo: FundingSourceAddress;
|
|
17
18
|
currencyCode: string;
|
|
18
19
|
defaultCarrierId: string;
|
|
19
20
|
fundingSourceId: string;
|
|
@@ -123,6 +124,13 @@ export type MetadataCarrierProfile = {
|
|
|
123
124
|
requiredTerms: MetadataRequiredTerm[];
|
|
124
125
|
};
|
|
125
126
|
export type TransactionCategory = "adjustment" | "credit" | "debit" | "funds_added" | "insurance" | "label" | "refund" | "service_charge" | "unknown";
|
|
127
|
+
export type FundingSourceTransactionInvoice = {
|
|
128
|
+
invoiceDownload: {
|
|
129
|
+
pdf: string;
|
|
130
|
+
};
|
|
131
|
+
invoiceId: string;
|
|
132
|
+
reference: string;
|
|
133
|
+
};
|
|
126
134
|
export type FundingSourceTransaction = {
|
|
127
135
|
description?: string | null;
|
|
128
136
|
endingBalance: {
|
|
@@ -131,6 +139,7 @@ export type FundingSourceTransaction = {
|
|
|
131
139
|
};
|
|
132
140
|
fundingSourceId: string;
|
|
133
141
|
fundingSourceTransactionId: string;
|
|
142
|
+
invoice: FundingSourceTransactionInvoice | null;
|
|
134
143
|
labelIds: string[];
|
|
135
144
|
relatedFundingSourceTransactionIds: string[];
|
|
136
145
|
shipmentIds: string[];
|
package/index.js
CHANGED
|
@@ -4132,6 +4132,17 @@ class ShipmentsAPI {
|
|
|
4132
4132
|
shipments
|
|
4133
4133
|
});
|
|
4134
4134
|
});
|
|
4135
|
+
/**
|
|
4136
|
+
* The `cancel` method by `shipmentId`
|
|
4137
|
+
* Marks a shipment cancelled, if it is no longer needed or being used by your organization.
|
|
4138
|
+
* Any label associated with the shipment needs to be voided first
|
|
4139
|
+
* An example use case would be if a batch label creation job is going to run at a set time and only queries pending shipments.
|
|
4140
|
+
* Marking a shipment as cancelled would remove it from this process
|
|
4141
|
+
* https://shipengine.github.io/shipengine-openapi/#operation/cancel_shipments
|
|
4142
|
+
*/
|
|
4143
|
+
this.cancel = (shipmentId) => {
|
|
4144
|
+
return this.client.put(`/v1/shipments/${shipmentId}/cancel`);
|
|
4145
|
+
};
|
|
4135
4146
|
this.client = client;
|
|
4136
4147
|
}
|
|
4137
4148
|
}
|
package/index.mjs
CHANGED
|
@@ -4128,6 +4128,17 @@ class ShipmentsAPI {
|
|
|
4128
4128
|
shipments
|
|
4129
4129
|
});
|
|
4130
4130
|
});
|
|
4131
|
+
/**
|
|
4132
|
+
* The `cancel` method by `shipmentId`
|
|
4133
|
+
* Marks a shipment cancelled, if it is no longer needed or being used by your organization.
|
|
4134
|
+
* Any label associated with the shipment needs to be voided first
|
|
4135
|
+
* An example use case would be if a batch label creation job is going to run at a set time and only queries pending shipments.
|
|
4136
|
+
* Marking a shipment as cancelled would remove it from this process
|
|
4137
|
+
* https://shipengine.github.io/shipengine-openapi/#operation/cancel_shipments
|
|
4138
|
+
*/
|
|
4139
|
+
this.cancel = (shipmentId) => {
|
|
4140
|
+
return this.client.put(`/v1/shipments/${shipmentId}/cancel`);
|
|
4141
|
+
};
|
|
4131
4142
|
this.client = client;
|
|
4132
4143
|
}
|
|
4133
4144
|
}
|
package/package.json
CHANGED
package/shipments/api.d.ts
CHANGED
|
@@ -73,4 +73,13 @@ export declare class ShipmentsAPI {
|
|
|
73
73
|
* items passed into this method.
|
|
74
74
|
*/
|
|
75
75
|
create: (...shipments: Partial<Omit<Shipment, "items">>[]) => Promise<import("axios").AxiosResponse<CreateShipmentResult, any>>;
|
|
76
|
+
/**
|
|
77
|
+
* The `cancel` method by `shipmentId`
|
|
78
|
+
* Marks a shipment cancelled, if it is no longer needed or being used by your organization.
|
|
79
|
+
* Any label associated with the shipment needs to be voided first
|
|
80
|
+
* An example use case would be if a batch label creation job is going to run at a set time and only queries pending shipments.
|
|
81
|
+
* Marking a shipment as cancelled would remove it from this process
|
|
82
|
+
* https://shipengine.github.io/shipengine-openapi/#operation/cancel_shipments
|
|
83
|
+
*/
|
|
84
|
+
cancel: (shipmentId: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
76
85
|
}
|