diff --git a/sdk/extensions/ups/karrio/providers/ups/rate.py b/sdk/extensions/ups/karrio/providers/ups/rate.py index 97a5454900..935053828f 100644 --- a/sdk/extensions/ups/karrio/providers/ups/rate.py +++ b/sdk/extensions/ups/karrio/providers/ups/rate.py @@ -273,7 +273,7 @@ def rate_request( else None ), ) - if any(options.pickup_options.state) + if options.pickup_options and options.pickup_options.state and any(options.pickup_options.state) else None ), DeliveryOptions=( @@ -285,7 +285,7 @@ def rate_request( else None ), ) - if any(options.delivery_options.state) + if options.delivery_options and options.delivery_options.state and any(options.delivery_options.state) else None ), RestrictedArticles=( diff --git a/sdk/extensions/usps/karrio/providers/usps/units.py b/sdk/extensions/usps/karrio/providers/usps/units.py index 81489a1779..4d0ed04bd5 100644 --- a/sdk/extensions/usps/karrio/providers/usps/units.py +++ b/sdk/extensions/usps/karrio/providers/usps/units.py @@ -216,6 +216,11 @@ class ShipmentService(Enum): usps_online = "Online" usps_plus = "Plus" usps_bpm = "BPM" + usps_ground_advantage = "Ground Advantage" + usps_ground_advantage_commercial = "Ground Advantage Commercial" + usps_ground_advantage_hfp = "Ground Advantage HFP" + usps_ground_advantage_hfp_commercial = "Ground Advantage HFP Commercial" + usps_ground_advantage_cubic = "Ground Advantage Cubic" class ServiceClassID(Enum): @@ -279,6 +284,14 @@ class ServiceClassID(Enum): usps_bpm_flats_hold_for_pickup = "2020" usps_parcel_select_ground_hold_for_pickup = "2071" usps_bpm_parcels_hold_for_pickup = "2077" + usps_ground_advantage_cubic = "1096" + usps_ground_advantage_cubic_hold_for_pickup = "2096" + usps_ground_advantage_cubic_hazmat = "4096" + usps_ground_advantage_cubic_parcel_locker = "6096" + usps_ground_advantage = "1058" + usps_ground_advantage_hold_for_pickup = "2058" + usps_ground_advantage_hazmat = "4058" + usps_ground_advantage_parcel_locker = "6058" class ServiceType(Enum): @@ -290,6 +303,8 @@ class ServiceType(Enum): usps_priority_mail_express = "PRIORITY EXPRESS" usps_priority_mail_cubic = "PRIORITY MAIL CUBIC" usps_parcel_select_ground = "PARCEL SELECT GROUND" + usps_ground_advantage = "GROUND ADVANTAGE" + usps_ground_advantage_cubic = "GROUND ADVANTAGE CUBIC" """ ShipmentService type correspondence """ usps_first_class_mail_large_envelope = usps_first_class