UNPKG

@springtree/eva-core

Version:
147 lines (126 loc) 3.75 kB
declare module EVA.Carrier.PostNL { export namespace Errors { export namespace PostNL { export const NoValidCoordinates = 'PostNL:NoValidCoordinates'; export const MissingShippingAddress = 'PostNL:MissingShippingAddress'; } } /** * List the available PostNL PickupPoints for the given order, in the requested area. */ export interface PostNLGetAvailablePickUpLocationsForArea { OrderID: number; NorthWest: Coordinate; SouthEast: Coordinate; } export interface Coordinate { Latitude?: number; Longitude?: number; } export interface PostNLGetAvailablePickUpLocationsForAreaResponse { Locations: Location[]; Error: EVA.Core.ServiceError; } export interface Location { LocationCode: string; Name: string; Distance: number; Latitude?: number; Longitude?: number; Address: LocationAddress; DeliveryOptions: string[]; OpeningHours: LocationOpeningHours; PartnerName: string; PhoneNumber: string; RetailNetworkID: string; Saleschannel: string; TerminalType: string; } export interface LocationAddress { Countrycode: string; Zipcode: string; HouseNr: string; Street: string; City: string; Remark: string; } export interface LocationOpeningHours { Monday: string[]; Tuesday: string[]; Wednesday: string[]; Thursday: string[]; Friday: string[]; Saturday: string[]; Sunday: string[]; } /** * List the available PostNL PickupPoints for the given order. The locations will be based on the ShippingAddress of the Order. */ export interface PostNLGetAvailablePickUpLocationsForOrder { OrderID: number; } export interface PostNLGetAvailablePickUpLocationsForOrderResponse { Locations: Location[]; Error: EVA.Core.ServiceError; } /** * List the available PostNL timeframe options for the given order. * * * The `StartDate` and `EndDate` parameters are required and inclusive, the time portions will be ignored. * * Will cross-reference PostNL timeframes with EVA stock availability and return only valid options for both * * When `SkipAvailabilityChecks` is true, the ExpectedAvailabilityDate on the lines is ignored * * Only lines set to PostNL will be used for the EVA stock availability check; unless no lines apply, in which case all lines are considered. */ export interface PostNLGetAvailableTimeframesForOrder { OrderID: number; StartDate?: string; EndDate?: string; SkipAvailabilityChecks: boolean; } export interface PostNLGetAvailableTimeframesForOrderResponse { Frames: AvailableTimeframeDate[]; Error: EVA.Core.ServiceError; } export interface AvailableTimeframeDate { Date?: string; Timeframes: AvailableTimeframe[]; } export interface AvailableTimeframe { Option: TimeframeOptions; StartDateTime?: string; EndDateTime?: string; Costs?: number; } export const enum TimeframeOptions { Daytime = 1, Evening = 2, Morning = 4, Noon = 8, Sunday = 16, Sameday = 32, Afternoon = 64, All = 127 } /** * Return the selected PostNL shipping options for the given Order. */ export interface PostNLGetShippingOptionsForOrder { OrderID: number; } export interface PostNLGetShippingOptionsForOrderResponse { Date?: string; TimeframeOptions: TimeframeOptions; PickUpLocationID: string; Error: EVA.Core.ServiceError; } /** * Set the requested PostNL shipping options for the given Order. */ export interface PostNLUpdateShippingOptionsForOrder { OrderID: number; Date?: string; TimeframeOptions: TimeframeOptions; PickUpLocationID?: string; } }