@shipengine/connect-carrier-api 2.12.15 → 2.12.18
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/lib/models/advanced-options.d.ts +5 -0
- package/lib/models/advanced-options.js.map +1 -1
- package/lib/models/bill-to.d.ts +14 -0
- package/lib/models/bill-to.js +14 -0
- package/lib/models/bill-to.js.map +1 -0
- package/lib/models/billing/billing-to-party.d.ts +10 -0
- package/lib/models/billing/billing-to-party.js +15 -0
- package/lib/models/billing/billing-to-party.js.map +1 -0
- package/lib/models/billing/index.d.ts +1 -0
- package/lib/models/billing/index.js +1 -0
- package/lib/models/billing/index.js.map +1 -1
- package/lib/models/cod-payment-type.d.ts +9 -0
- package/lib/models/cod-payment-type.js +14 -0
- package/lib/models/cod-payment-type.js.map +1 -0
- package/lib/models/collect-on-delivery.d.ts +9 -0
- package/lib/models/collect-on-delivery.js +8 -0
- package/lib/models/collect-on-delivery.js.map +1 -0
- package/lib/models/index.d.ts +3 -0
- package/lib/models/index.js +3 -0
- package/lib/models/index.js.map +1 -1
- package/lib/requests/create-label-request.d.ts +3 -1
- package/lib/requests/create-label-request.js.map +1 -1
- package/lib/requests/get-rates-request.d.ts +3 -1
- package/lib/requests/get-rates-request.js.map +1 -1
- package/package.json +3 -3
- package/spec.json +49 -1
- package/src/models/advanced-options.ts +5 -0
- package/src/models/bill-to.ts +15 -0
- package/src/models/billing/billing-to-party.ts +10 -0
- package/src/models/billing/index.ts +1 -0
- package/src/models/cod-payment-type.ts +9 -0
- package/src/models/collect-on-delivery.ts +10 -0
- package/src/models/index.ts +3 -0
- package/src/requests/create-label-request.ts +3 -0
- package/src/requests/get-rates-request.ts +3 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CollectOnDelivery } from './collect-on-delivery';
|
|
1
2
|
import { Currency } from './currency';
|
|
2
3
|
/** @description Basic structure for shipping options */
|
|
3
4
|
export declare class AdvancedOptions {
|
|
@@ -13,6 +14,10 @@ export declare class AdvancedOptions {
|
|
|
13
14
|
saturday_delivery?: boolean;
|
|
14
15
|
/** @description Amount to be paid to the driver, used for local delivery and courier services */
|
|
15
16
|
tip?: Currency;
|
|
17
|
+
/** @description Describes whether Additional Handling is requested for the shipment */
|
|
18
|
+
additional_handling?: boolean;
|
|
19
|
+
/** @description Describes details for Collect on Delivery (COD) if requested for the shipment */
|
|
20
|
+
collect_on_delivery?: CollectOnDelivery;
|
|
16
21
|
/** @description Any other custom shipping options */
|
|
17
22
|
[key: string]: any;
|
|
18
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advanced-options.js","sourceRoot":"","sources":["../../src/models/advanced-options.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"advanced-options.js","sourceRoot":"","sources":["../../src/models/advanced-options.ts"],"names":[],"mappings":";;;AAGA,wDAAwD;AACxD,MAAa,eAAe;CAmB3B;AAnBD,0CAmBC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AddressBase } from './addresses';
|
|
2
|
+
import { BillToParty } from './billing';
|
|
3
|
+
/**
|
|
4
|
+
* @description Bill to is a generic object used for billing a part of the shipment, duties, taxes, or otherwise to a party
|
|
5
|
+
other than the shipper (the shipper is considered the default party responsible). Ref: BillTo extends AddressBase.
|
|
6
|
+
since address fields are often required when associating billing to
|
|
7
|
+
another account. Additionally, this allows for a contact to be specified, if necessary.
|
|
8
|
+
*/
|
|
9
|
+
export declare class BillTo extends AddressBase {
|
|
10
|
+
/** @description The bill_to_party mentions the type of billing option*/
|
|
11
|
+
bill_to_party?: BillToParty;
|
|
12
|
+
/** @description Specified if there is an account number associated with the Bill To Party, and the Bill To Party is not the account holder. */
|
|
13
|
+
account_number?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BillTo = void 0;
|
|
4
|
+
const addresses_1 = require("./addresses");
|
|
5
|
+
/**
|
|
6
|
+
* @description Bill to is a generic object used for billing a part of the shipment, duties, taxes, or otherwise to a party
|
|
7
|
+
other than the shipper (the shipper is considered the default party responsible). Ref: BillTo extends AddressBase.
|
|
8
|
+
since address fields are often required when associating billing to
|
|
9
|
+
another account. Additionally, this allows for a contact to be specified, if necessary.
|
|
10
|
+
*/
|
|
11
|
+
class BillTo extends addresses_1.AddressBase {
|
|
12
|
+
}
|
|
13
|
+
exports.BillTo = BillTo;
|
|
14
|
+
//# sourceMappingURL=bill-to.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bill-to.js","sourceRoot":"","sources":["../../src/models/bill-to.ts"],"names":[],"mappings":";;;AAAA,2CAA0C;AAG1C;;;;;GAKG;AACH,MAAa,MAAO,SAAQ,uBAAW;CAKtC;AALD,wBAKC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** @description The type of party responsible for a given category of charges associated with a shipment, such as
|
|
2
|
+
* shipping charges or import duties. */
|
|
3
|
+
export declare enum BillToParty {
|
|
4
|
+
/** @description The shipper is generally regarded as the party responsible for the billing. */
|
|
5
|
+
Shipper = "shipper",
|
|
6
|
+
/** @description The recipient may be responsible for the billing of some entities, that could include the shipping cost. */
|
|
7
|
+
Recipient = "recipient",
|
|
8
|
+
/** @description A shipper may want to bill to a third-party; especially common for 3PLs and larger volume. merchants */
|
|
9
|
+
ThirdPartyAccount = "third_party_account"
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BillToParty = void 0;
|
|
4
|
+
/** @description The type of party responsible for a given category of charges associated with a shipment, such as
|
|
5
|
+
* shipping charges or import duties. */
|
|
6
|
+
var BillToParty;
|
|
7
|
+
(function (BillToParty) {
|
|
8
|
+
/** @description The shipper is generally regarded as the party responsible for the billing. */
|
|
9
|
+
BillToParty["Shipper"] = "shipper";
|
|
10
|
+
/** @description The recipient may be responsible for the billing of some entities, that could include the shipping cost. */
|
|
11
|
+
BillToParty["Recipient"] = "recipient";
|
|
12
|
+
/** @description A shipper may want to bill to a third-party; especially common for 3PLs and larger volume. merchants */
|
|
13
|
+
BillToParty["ThirdPartyAccount"] = "third_party_account";
|
|
14
|
+
})(BillToParty = exports.BillToParty || (exports.BillToParty = {}));
|
|
15
|
+
//# sourceMappingURL=billing-to-party.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-to-party.js","sourceRoot":"","sources":["../../../src/models/billing/billing-to-party.ts"],"names":[],"mappings":";;;AAAA;wCACwC;AACxC,IAAY,WAOX;AAPD,WAAY,WAAW;IACrB,+FAA+F;IAC/F,kCAAmB,CAAA;IACnB,4HAA4H;IAC5H,sCAAuB,CAAA;IACvB,wHAAwH;IACxH,wDAAyC,CAAA;AAC3C,CAAC,EAPW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAOtB"}
|
|
@@ -5,4 +5,5 @@ tslib_1.__exportStar(require("./billing-categories"), exports);
|
|
|
5
5
|
tslib_1.__exportStar(require("./billing-categories-schema"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./billing-line-item"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./billing-line-item-schema"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./billing-to-party"), exports);
|
|
8
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/billing/index.ts"],"names":[],"mappings":";;;AAAA,+DAAqC;AACrC,sEAA4C;AAC5C,8DAAoC;AACpC,qEAA2C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/billing/index.ts"],"names":[],"mappings":";;;AAAA,+DAAqC;AACrC,sEAA4C;AAC5C,8DAAoC;AACpC,qEAA2C;AAC3C,6DAAmC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** @description Specifies which payment method is permitted when Collect on Delivery (COD) is requested on a shipment */
|
|
2
|
+
export declare enum CodPaymentType {
|
|
3
|
+
/** @description Any payment method is permitted */
|
|
4
|
+
Any = "any",
|
|
5
|
+
/** @description Only cash is permitted */
|
|
6
|
+
Cash = "cash",
|
|
7
|
+
/** @description Only guaranteed funds are permitted, such as a money order or cashier's check */
|
|
8
|
+
GuaranteedFunds = "guaranteed_funds"
|
|
9
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CodPaymentType = void 0;
|
|
4
|
+
/** @description Specifies which payment method is permitted when Collect on Delivery (COD) is requested on a shipment */
|
|
5
|
+
var CodPaymentType;
|
|
6
|
+
(function (CodPaymentType) {
|
|
7
|
+
/** @description Any payment method is permitted */
|
|
8
|
+
CodPaymentType["Any"] = "any";
|
|
9
|
+
/** @description Only cash is permitted */
|
|
10
|
+
CodPaymentType["Cash"] = "cash";
|
|
11
|
+
/** @description Only guaranteed funds are permitted, such as a money order or cashier's check */
|
|
12
|
+
CodPaymentType["GuaranteedFunds"] = "guaranteed_funds";
|
|
13
|
+
})(CodPaymentType = exports.CodPaymentType || (exports.CodPaymentType = {}));
|
|
14
|
+
//# sourceMappingURL=cod-payment-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cod-payment-type.js","sourceRoot":"","sources":["../../src/models/cod-payment-type.ts"],"names":[],"mappings":";;;AAAA,yHAAyH;AACzH,IAAY,cAOX;AAPD,WAAY,cAAc;IACxB,mDAAmD;IACnD,6BAAW,CAAA;IACX,0CAA0C;IAC1C,+BAAa,CAAA;IACb,iGAAiG;IACjG,sDAAoC,CAAA;AACtC,CAAC,EAPW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAOzB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CodPaymentType } from './cod-payment-type';
|
|
2
|
+
import { Currency } from './currency';
|
|
3
|
+
/** @description This model represents the option to defer payment for a shipment, otherwise known as Collect on Delivery (COD) */
|
|
4
|
+
export declare class CollectOnDelivery {
|
|
5
|
+
/** @description The payment amount for Collect on Delivery (COD) */
|
|
6
|
+
payment_amount: Currency;
|
|
7
|
+
/** @description The payment method permitted for Collect on Delivery (COD) */
|
|
8
|
+
payment_type?: CodPaymentType;
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CollectOnDelivery = void 0;
|
|
4
|
+
/** @description This model represents the option to defer payment for a shipment, otherwise known as Collect on Delivery (COD) */
|
|
5
|
+
class CollectOnDelivery {
|
|
6
|
+
}
|
|
7
|
+
exports.CollectOnDelivery = CollectOnDelivery;
|
|
8
|
+
//# sourceMappingURL=collect-on-delivery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collect-on-delivery.js","sourceRoot":"","sources":["../../src/models/collect-on-delivery.ts"],"names":[],"mappings":";;;AAGA,kIAAkI;AAClI,MAAa,iBAAiB;CAK7B;AALD,8CAKC"}
|
package/lib/models/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from './addresses';
|
|
2
2
|
export * from './advanced-options';
|
|
3
3
|
export * from './authorization';
|
|
4
|
+
export * from './cod-payment-type';
|
|
5
|
+
export * from './collect-on-delivery';
|
|
4
6
|
export * from './billing';
|
|
5
7
|
export * from './confirmation-types';
|
|
6
8
|
export * from './currency-schema';
|
|
@@ -30,3 +32,4 @@ export * from './time-window-schema';
|
|
|
30
32
|
export * from './time-window';
|
|
31
33
|
export * from './tracking';
|
|
32
34
|
export * from './units';
|
|
35
|
+
export * from './bill-to';
|
package/lib/models/index.js
CHANGED
|
@@ -4,6 +4,8 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
tslib_1.__exportStar(require("./addresses"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./advanced-options"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./authorization"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./cod-payment-type"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./collect-on-delivery"), exports);
|
|
7
9
|
tslib_1.__exportStar(require("./billing"), exports);
|
|
8
10
|
tslib_1.__exportStar(require("./confirmation-types"), exports);
|
|
9
11
|
tslib_1.__exportStar(require("./currency-schema"), exports);
|
|
@@ -33,4 +35,5 @@ tslib_1.__exportStar(require("./time-window-schema"), exports);
|
|
|
33
35
|
tslib_1.__exportStar(require("./time-window"), exports);
|
|
34
36
|
tslib_1.__exportStar(require("./tracking"), exports);
|
|
35
37
|
tslib_1.__exportStar(require("./units"), exports);
|
|
38
|
+
tslib_1.__exportStar(require("./bill-to"), exports);
|
|
36
39
|
//# sourceMappingURL=index.js.map
|
package/lib/models/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B;AAC5B,6DAAmC;AACnC,0DAAgC;AAChC,oDAA0B;AAC1B,+DAAqC;AACrC,4DAAkC;AAClC,qDAA2B;AAC3B,oDAA0B;AAC1B,kEAAwC;AACxC,2DAAiC;AACjC,sDAA4B;AAC5B,mDAAyB;AACzB,8DAAoC;AACpC,8DAAoC;AACpC,uDAA6B;AAC7B,yEAA+C;AAC/C,kEAAwC;AACxC,gEAAsC;AACtC,mDAAyB;AACzB,sDAA4B;AAC5B,oDAA0B;AAC1B,mDAAyB;AACzB,kDAAwB;AACxB,yDAA+B;AAC/B,yDAA+B;AAC/B,qEAA2C;AAC3C,8DAAoC;AACpC,kDAAwB;AACxB,+DAAqC;AACrC,wDAA8B;AAC9B,qDAA2B;AAC3B,kDAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B;AAC5B,6DAAmC;AACnC,0DAAgC;AAChC,6DAAmC;AACnC,gEAAsC;AACtC,oDAA0B;AAC1B,+DAAqC;AACrC,4DAAkC;AAClC,qDAA2B;AAC3B,oDAA0B;AAC1B,kEAAwC;AACxC,2DAAiC;AACjC,sDAA4B;AAC5B,mDAAyB;AACzB,8DAAoC;AACpC,8DAAoC;AACpC,uDAA6B;AAC7B,yEAA+C;AAC/C,kEAAwC;AACxC,gEAAsC;AACtC,mDAAyB;AACzB,sDAA4B;AAC5B,oDAA0B;AAC1B,mDAAyB;AACzB,kDAAwB;AACxB,yDAA+B;AAC/B,yDAA+B;AAC/B,qEAA2C;AAC3C,8DAAoC;AACpC,kDAAwB;AACxB,+DAAqC;AACrC,wDAA8B;AAC9B,qDAA2B;AAC3B,kDAAwB;AACxB,oDAA0B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseRequest } from './base-request';
|
|
2
|
-
import { AdvancedOptions, ConfirmationTypes, FulfillmentPlanDetails, InsuranceProviders, DocumentFormat, LabelLayouts, Package, ReturnLabelDetails, ShipFrom, PudoLocation, ShipFromDisplay, ShipTo, Document, TimeWindow, RelayPointDetails, DisplayScheme, Customs } from '../models';
|
|
2
|
+
import { AdvancedOptions, ConfirmationTypes, FulfillmentPlanDetails, InsuranceProviders, DocumentFormat, LabelLayouts, Package, ReturnLabelDetails, ShipFrom, PudoLocation, ShipFromDisplay, ShipTo, Document, TimeWindow, RelayPointDetails, DisplayScheme, Customs, BillTo } from '../models';
|
|
3
3
|
/** @description Basic structure for a request to create a label */
|
|
4
4
|
export declare class CreateLabelRequest extends BaseRequest {
|
|
5
5
|
service_code?: string;
|
|
@@ -35,4 +35,6 @@ export declare class CreateLabelRequest extends BaseRequest {
|
|
|
35
35
|
/** @description Display schemes that the label will be returned in. Label is returned by default */
|
|
36
36
|
display_schemes?: DisplayScheme[];
|
|
37
37
|
customs?: Customs;
|
|
38
|
+
/** @description Bill the shipping charges to this entity. If null, it should be assumed the "shipper" is responsible for the shipping charges. */
|
|
39
|
+
bill_shipping_to?: BillTo;
|
|
38
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-label-request.js","sourceRoot":"","sources":["../../src/requests/create-label-request.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;
|
|
1
|
+
{"version":3,"file":"create-label-request.js","sourceRoot":"","sources":["../../src/requests/create-label-request.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAsB7C,mEAAmE;AACnE,MAAa,kBAAmB,SAAQ,0BAAW;CAoClD;AApCD,gDAoCC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseRequest } from './base-request';
|
|
2
|
-
import { ConfirmationTypes, AdvancedOptions, InsuranceProviders, Package, Customs, ShipFrom, ShipTo, PudoLocation, FulfillmentPlanDetails, TimeWindow } from '../models';
|
|
2
|
+
import { ConfirmationTypes, AdvancedOptions, InsuranceProviders, Package, Customs, ShipFrom, ShipTo, PudoLocation, FulfillmentPlanDetails, TimeWindow, BillTo } from '../models';
|
|
3
3
|
import { ShipmentItem } from '../models/shipment-item';
|
|
4
4
|
/** @description Basic structure for a request to get rates */
|
|
5
5
|
export declare class GetRatesRequest extends BaseRequest {
|
|
@@ -21,4 +21,6 @@ export declare class GetRatesRequest extends BaseRequest {
|
|
|
21
21
|
carrier_pickup_window?: TimeWindow;
|
|
22
22
|
/** Items included in the shipment */
|
|
23
23
|
items?: ShipmentItem[];
|
|
24
|
+
/** @description Bill the shipping charges to this entity. If null, it should be assumed the "shipper" is responsible for the shipping charges. */
|
|
25
|
+
bill_shipping_to?: BillTo;
|
|
24
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-rates-request.js","sourceRoot":"","sources":["../../src/requests/get-rates-request.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;
|
|
1
|
+
{"version":3,"file":"get-rates-request.js","sourceRoot":"","sources":["../../src/requests/get-rates-request.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAgB7C,8DAA8D;AAC9D,MAAa,eAAgB,SAAQ,0BAAW;CAqB/C;AArBD,0CAqBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipengine/connect-carrier-api",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.18",
|
|
4
4
|
"description": "This is the typescript/javascript definitions for carrier api",
|
|
5
5
|
"homepage": "https://github.com/ShipEngine/connect",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
"vitest": "^0.23.4"
|
|
38
38
|
},
|
|
39
39
|
"optionalDependencies": {
|
|
40
|
-
"vm2": "^3.9.
|
|
40
|
+
"vm2": "^3.9.16"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"joi": "^17.4.2",
|
|
44
44
|
"tslib": "^2.5.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@shipengine/connect-runtime": "^1.3.
|
|
47
|
+
"@shipengine/connect-runtime": "^1.3.3",
|
|
48
48
|
"express": "^4.18.2",
|
|
49
49
|
"winston": "^3.8.2"
|
|
50
50
|
}
|
package/spec.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Shipping API",
|
|
5
5
|
"description": "This API specification describes the canonical ShipEngine Shipping API connector module.",
|
|
6
|
-
"version": "1.17.
|
|
6
|
+
"version": "1.17.2"
|
|
7
7
|
},
|
|
8
8
|
"paths": {
|
|
9
9
|
"/Register": {
|
|
@@ -754,6 +754,13 @@
|
|
|
754
754
|
},
|
|
755
755
|
"description": "Amount to be paid to the driver, used for local delivery and courier services.",
|
|
756
756
|
"nullable": true
|
|
757
|
+
},
|
|
758
|
+
"additional_handling": {
|
|
759
|
+
"type": "boolean",
|
|
760
|
+
"description": "Describes whether Additional Handling is requested for the shipment."
|
|
761
|
+
},
|
|
762
|
+
"collect_on_delivery": {
|
|
763
|
+
"$ref": "#/components/schemas/CollectOnDelivery"
|
|
757
764
|
}
|
|
758
765
|
},
|
|
759
766
|
"additionalProperties": { },
|
|
@@ -1085,6 +1092,47 @@
|
|
|
1085
1092
|
"additionalProperties": false,
|
|
1086
1093
|
"description": "This model represents a response for a successful cancel pickup request."
|
|
1087
1094
|
},
|
|
1095
|
+
"CodPaymentType": {
|
|
1096
|
+
"enum": [
|
|
1097
|
+
"any",
|
|
1098
|
+
"cash",
|
|
1099
|
+
"guaranteed_funds"
|
|
1100
|
+
],
|
|
1101
|
+
"type": "string",
|
|
1102
|
+
"description": "Specifies which payment method is permitted when Collect on Delivery (COD) is requested on a shipment.\r\nany - Any payment method is permitted.\r\ncash - Only cash is permitted.\r\nguaranteed_funds - Only guaranteed funds are permitted, such as a money order or cashier's check."
|
|
1103
|
+
},
|
|
1104
|
+
"CollectOnDelivery": {
|
|
1105
|
+
"required": [
|
|
1106
|
+
"payment_amount"
|
|
1107
|
+
],
|
|
1108
|
+
"type": "object",
|
|
1109
|
+
"properties": {
|
|
1110
|
+
"payment_amount": {
|
|
1111
|
+
"required": [
|
|
1112
|
+
"currency",
|
|
1113
|
+
"amount"
|
|
1114
|
+
],
|
|
1115
|
+
"type": "object",
|
|
1116
|
+
"properties": {
|
|
1117
|
+
"amount": {
|
|
1118
|
+
"type": "string",
|
|
1119
|
+
"description": "Decimal currency value, as a string."
|
|
1120
|
+
},
|
|
1121
|
+
"currency": {
|
|
1122
|
+
"type": "string",
|
|
1123
|
+
"description": "Alpha-3 currency code complying with ISO 4217."
|
|
1124
|
+
}
|
|
1125
|
+
},
|
|
1126
|
+
"description": "The payment amount for Collect on Delivery (COD).",
|
|
1127
|
+
"nullable": true
|
|
1128
|
+
},
|
|
1129
|
+
"payment_type": {
|
|
1130
|
+
"$ref": "#/components/schemas/CodPaymentType"
|
|
1131
|
+
}
|
|
1132
|
+
},
|
|
1133
|
+
"additionalProperties": false,
|
|
1134
|
+
"description": "This model represents the option to defer payment for a shipment, otherwise known as Collect on Delivery (COD)."
|
|
1135
|
+
},
|
|
1088
1136
|
"ConfirmationTypes": {
|
|
1089
1137
|
"enum": [
|
|
1090
1138
|
"None",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CollectOnDelivery } from './collect-on-delivery';
|
|
1
2
|
import { Currency } from './currency';
|
|
2
3
|
|
|
3
4
|
/** @description Basic structure for shipping options */
|
|
@@ -14,6 +15,10 @@ export class AdvancedOptions {
|
|
|
14
15
|
saturday_delivery?: boolean;
|
|
15
16
|
/** @description Amount to be paid to the driver, used for local delivery and courier services */
|
|
16
17
|
tip?: Currency;
|
|
18
|
+
/** @description Describes whether Additional Handling is requested for the shipment */
|
|
19
|
+
additional_handling?: boolean;
|
|
20
|
+
/** @description Describes details for Collect on Delivery (COD) if requested for the shipment */
|
|
21
|
+
collect_on_delivery?: CollectOnDelivery;
|
|
17
22
|
/** @description Any other custom shipping options */
|
|
18
23
|
[key: string]: any;
|
|
19
24
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AddressBase } from './addresses';
|
|
2
|
+
import { BillToParty } from './billing';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @description Bill to is a generic object used for billing a part of the shipment, duties, taxes, or otherwise to a party
|
|
6
|
+
other than the shipper (the shipper is considered the default party responsible). Ref: BillTo extends AddressBase.
|
|
7
|
+
since address fields are often required when associating billing to
|
|
8
|
+
another account. Additionally, this allows for a contact to be specified, if necessary.
|
|
9
|
+
*/
|
|
10
|
+
export class BillTo extends AddressBase {
|
|
11
|
+
/** @description The bill_to_party mentions the type of billing option*/
|
|
12
|
+
bill_to_party?: BillToParty;
|
|
13
|
+
/** @description Specified if there is an account number associated with the Bill To Party, and the Bill To Party is not the account holder. */
|
|
14
|
+
account_number?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** @description The type of party responsible for a given category of charges associated with a shipment, such as
|
|
2
|
+
* shipping charges or import duties. */
|
|
3
|
+
export enum BillToParty {
|
|
4
|
+
/** @description The shipper is generally regarded as the party responsible for the billing. */
|
|
5
|
+
Shipper = 'shipper',
|
|
6
|
+
/** @description The recipient may be responsible for the billing of some entities, that could include the shipping cost. */
|
|
7
|
+
Recipient = 'recipient',
|
|
8
|
+
/** @description A shipper may want to bill to a third-party; especially common for 3PLs and larger volume. merchants */
|
|
9
|
+
ThirdPartyAccount = 'third_party_account',
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** @description Specifies which payment method is permitted when Collect on Delivery (COD) is requested on a shipment */
|
|
2
|
+
export enum CodPaymentType {
|
|
3
|
+
/** @description Any payment method is permitted */
|
|
4
|
+
Any = 'any',
|
|
5
|
+
/** @description Only cash is permitted */
|
|
6
|
+
Cash = 'cash',
|
|
7
|
+
/** @description Only guaranteed funds are permitted, such as a money order or cashier's check */
|
|
8
|
+
GuaranteedFunds = 'guaranteed_funds',
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CodPaymentType } from './cod-payment-type';
|
|
2
|
+
import { Currency } from './currency';
|
|
3
|
+
|
|
4
|
+
/** @description This model represents the option to defer payment for a shipment, otherwise known as Collect on Delivery (COD) */
|
|
5
|
+
export class CollectOnDelivery {
|
|
6
|
+
/** @description The payment amount for Collect on Delivery (COD) */
|
|
7
|
+
payment_amount!: Currency;
|
|
8
|
+
/** @description The payment method permitted for Collect on Delivery (COD) */
|
|
9
|
+
payment_type?: CodPaymentType;
|
|
10
|
+
}
|
package/src/models/index.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from './addresses';
|
|
2
2
|
export * from './advanced-options';
|
|
3
3
|
export * from './authorization';
|
|
4
|
+
export * from './cod-payment-type';
|
|
5
|
+
export * from './collect-on-delivery';
|
|
4
6
|
export * from './billing';
|
|
5
7
|
export * from './confirmation-types';
|
|
6
8
|
export * from './currency-schema';
|
|
@@ -30,3 +32,4 @@ export * from './time-window-schema';
|
|
|
30
32
|
export * from './time-window';
|
|
31
33
|
export * from './tracking';
|
|
32
34
|
export * from './units';
|
|
35
|
+
export * from './bill-to';
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
RelayPointDetails,
|
|
18
18
|
DisplayScheme,
|
|
19
19
|
Customs,
|
|
20
|
+
BillTo,
|
|
20
21
|
} from '../models';
|
|
21
22
|
|
|
22
23
|
/** @description Basic structure for a request to create a label */
|
|
@@ -54,4 +55,6 @@ export class CreateLabelRequest extends BaseRequest {
|
|
|
54
55
|
/** @description Display schemes that the label will be returned in. Label is returned by default */
|
|
55
56
|
display_schemes?: DisplayScheme[];
|
|
56
57
|
customs?: Customs;
|
|
58
|
+
/** @description Bill the shipping charges to this entity. If null, it should be assumed the "shipper" is responsible for the shipping charges. */
|
|
59
|
+
bill_shipping_to?: BillTo;
|
|
57
60
|
}
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
PudoLocation,
|
|
11
11
|
FulfillmentPlanDetails,
|
|
12
12
|
TimeWindow,
|
|
13
|
+
BillTo,
|
|
13
14
|
} from '../models';
|
|
14
15
|
import { ShipmentItem } from '../models/shipment-item';
|
|
15
16
|
|
|
@@ -33,4 +34,6 @@ export class GetRatesRequest extends BaseRequest {
|
|
|
33
34
|
carrier_pickup_window?: TimeWindow;
|
|
34
35
|
/** Items included in the shipment */
|
|
35
36
|
items?: ShipmentItem[];
|
|
37
|
+
/** @description Bill the shipping charges to this entity. If null, it should be assumed the "shipper" is responsible for the shipping charges. */
|
|
38
|
+
bill_shipping_to?: BillTo;
|
|
36
39
|
}
|