@shipengine/connect-order-source-api
Version:
This is the typescript/javascript definitions for the order source api
85 lines • 5.14 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ShippingPreferencesSchema = exports.ShippingPreferences = void 0;
const tslib_1 = require("tslib");
const joi_1 = tslib_1.__importDefault(require("joi"));
const document_1 = require("./document");
/** @description This represents the shipping preferences specified for an order */
class ShippingPreferences {
/** @description Indicates whether or not the item being delivered is a digital good or not */
digital_fulfillment;
/** @description Indicates whether or not this shipment will require additional handling */
additional_handling;
/** @description Indicates whether duties should be billed to the sender of the package */
bill_duties_to_sender;
/** @description Indicates whether you must pay for postage at drop off, for carriers that usually require prepaid postage. */
do_not_prepay_postage;
/** @description Indicates whether or not this order is a gift */
gift;
/** @description Indicates whether or not this order contains alcohol */
has_alcohol;
/** @description Indicates whether or not insurance has been requested for shipping this order */
insurance_requested;
/** @description Indicates whether or not this order is nonmachinable (must be sorted outside of the standard, automated mail process) */
non_machinable;
/** @description Indicates whether or not this order should be delivered on a saturday */
saturday_delivery;
/** @description Indicates whether or not to allow display of postage paid on the shipping label */
show_postage;
/** @description Indicates whether or not to supress email notifications to the buyer */
suppress_email_notify;
/** @description Indicates whether or not to supress email notifications to the seller */
suppress_marketplace_notify;
/** @description The (ISO 8601) datetime (UTC) associated with when the order needs to be delivered by @example "2021-03-31T18:21:14.858Z" */
deliver_by_date;
/** @description The (ISO 8601) datetime (UTC) associated with how long to hold the order @example "2021-03-31T18:21:14.858Z" */
hold_until_date;
/** @description The (ISO 8601) datetime (UTC) associated with when the order is ready to ship @example "2021-03-31T18:21:14.858Z" */
ready_to_ship_date;
/** @description The (ISO 8601) datetime (UTC) associated with when the order needs to be shipped by @example "2021-03-31T18:21:14.858Z" */
ship_by_date;
/** @description The identifer assigned by a fulfillment planning system at checkout (Delivery Options). */
preplanned_fulfillment_id;
/** @description The requested shipping service for this fulfillment */
shipping_service;
/** @description The requested package type for this fulfillment */
package_type;
/** @description The amount of money being request for insurance on this shipment */
insured_value;
/** @description true if the order was placed under the terms of the order source's premium program (Amazon Prime, Walmart+, etc) */
is_premium_program;
/** @description The name of the premium program, if any. This is for informational purposes. Consumers should base all logic on is_premium_program flag. */
premium_program_name;
/** @description The warehouse name associated with the requested warehouse */
requested_warehouse;
/** @description Any documents relevant to shipping that the order source provides */
documents;
}
exports.ShippingPreferences = ShippingPreferences;
exports.ShippingPreferencesSchema = joi_1.default.object({
digital_fulfillment: joi_1.default.boolean().optional(),
additional_handling: joi_1.default.boolean().optional(),
bill_duties_to_sender: joi_1.default.boolean().optional(),
do_not_prepay_postage: joi_1.default.boolean().optional(),
gift: joi_1.default.boolean().optional(),
has_alcohol: joi_1.default.boolean().optional(),
insurance_requested: joi_1.default.boolean().optional(),
non_machinable: joi_1.default.boolean().optional(),
saturday_delivery: joi_1.default.boolean().optional(),
show_postage: joi_1.default.boolean().optional(),
suppress_email_notify: joi_1.default.boolean().optional(),
suppress_marketplace_notify: joi_1.default.boolean().optional(),
deliver_by_date: joi_1.default.string().optional().isoDate(),
hold_until_date: joi_1.default.string().optional().isoDate(),
ready_to_ship_date: joi_1.default.string().optional().isoDate(),
ship_by_date: joi_1.default.string().optional().isoDate(),
preplanned_fulfillment_id: joi_1.default.string().optional(),
shipping_service: joi_1.default.string().optional(),
package_type: joi_1.default.string().optional(),
insured_value: joi_1.default.number().optional(),
is_premium_program: joi_1.default.boolean().optional(),
premium_program_name: joi_1.default.string().optional(),
requested_warehouse: joi_1.default.string().optional(),
documents: joi_1.default.array().optional().items(document_1.DocumentSchema),
});
//# sourceMappingURL=shipping-preferences.js.map