pullingshots / Shipment

Perl interface into various shipping web service API's - FedEx, UPS, Purolator, Temando, Canada Post
https://metacpan.org/pod/Shipment
19 stars 19 forks source link

UPS incorrect signature type #45

Closed mrmaloof closed 1 year ago

mrmaloof commented 1 year ago

UPS defines different values for DCISType for DeliveryConfirmation. One set of values is used for ShipmentServiceOptions and a different set of values for PackageServiceOptions. If we generate a shipping label with signature_type = 'adult', we don't get "ADULT SIGNATURE REQUIRED" on the label, just "SIGNATURE REQUIRED".

The following is from "Shipping - Package XML Developer Guide" - October 10, 2022 from the UPS Developer Kit.

/ShipmentConfirmRequest/Shipment/ShipmentServiceOptions/DeliveryConfirmation/DCISType Valid values are: 1 - Delivery Confirmation Signature Required 2 - Delivery Confirmation Adult Signature Required.

/ShipmentConfirmRequest/Shipment/Package/PackageServiceOptions/DeliveryConfirmation/PackageServiceOptio ns/DeliveryConfirmation/DCISType Valid values: 1 - Unsupported 2 - Delivery Confirmation Signature Required 3 - Delivery Confirmation Adult Signature Required

I propose replacing the signature_type_map using the values for PackageServiceOptions. These values are not used in ShipmentServiceOptions, AFAICT. I'll take a stab at this.

pullingshots commented 1 year ago

Thanks so much for the bug report and pull request! It looks good to me, I'll work on a release to CPAN.