From 0d06b79495ba3c116184e6d17f6860cad2c21fd6 Mon Sep 17 00:00:00 2001 From: EJ Mercado Date: Tue, 28 Jul 2020 18:14:23 +0800 Subject: [PATCH] feat: fixed missing parameters from creaetScheduledPackage --- src/sections/easy-ship.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/sections/easy-ship.ts b/src/sections/easy-ship.ts index bdcc6d68..e66a221f 100644 --- a/src/sections/easy-ship.ts +++ b/src/sections/easy-ship.ts @@ -50,7 +50,7 @@ const ListPickupSlotsResponse = Codec.interface({ export interface ESItem { OrderItemId: string - OrderItemSerialNumberList: string + OrderItemSerialNumberList: string[] } export interface PickupSlot { @@ -240,13 +240,19 @@ export class EasyShip { PackageRequestDetails: { PackageDimensions: parameters.PackageRequestDetails.PackageDimensions, PackageWeight: parameters.PackageRequestDetails.PackageWeight, + PackageIdentifier: parameters.PackageRequestDetails.PackageIdentifier, PackagePickupSlot: { SlotId: parameters.PackageRequestDetails.PackagePickupSlot.SlotId, PickupTimeStart: parameters.PackageRequestDetails.PackagePickupSlot.PickupTimeStart.toISOString(), PickupTimeEnd: parameters.PackageRequestDetails.PackagePickupSlot.PickupTimeEnd.toISOString(), }, + 'PackageItemList.Item': parameters.PackageRequestDetails.PackageItemList + ? parameters.PackageRequestDetails.PackageItemList.map((item) => ({ + OrderItemId: item.OrderItemId, + 'OrderItemSerialNumberList.member': item.OrderItemSerialNumberList, + })) + : undefined, }, - PackageIdentifier: parameters.PackageRequestDetails.PackageIdentifier, }, })