abantecart / ups-php

PHP SDK to UPS RESTful API
MIT License
13 stars 9 forks source link

Cannot use "parent" when current class scope has no parent Error #11

Closed crazyj9 closed 8 months ago

crazyj9 commented 8 months ago

Hi,

I'm try to do zip code check for Saturday delivery (using time in transit) and when I use the zip code 84098 in the request, I'm getting an error:

Cannot use "parent" when current class scope has no parent {"exception":"[object] (Symfony\Component\ErrorHandler\Error\FatalError(code: 0): Cannot use \"parent\" when current class scope has no parent at /Users/crazyj9/Library/CloudStorage/Dropbox/Code/Sites/GMLapp/vendor/abantecart/ups-php/TimeInTransit/src/TimeInTransit/DestinationPickList.php:181)

Here's the body of the request:

` UPS\TimeInTransit\TimeInTransit\TimeInTransitRequest Object ( [container:protected] => Array ( [origin_country_code] => US [origin_state_province] => [origin_city_name] => [origin_town_name] => [origin_postal_code] => 04101 [destination_country_code] => US [destination_state_province] => [destination_city_name] => [destination_town_name] => [destination_postal_code] => 84098 [residential_indicator] => 01 [ship_date] => 2023-12-22 [ship_time] => [weight] => 10.5 [weight_unit_of_measure] => LBS [shipment_contents_value] => 100 [shipment_contents_currency_code] => USD [bill_type] => 03 [avv_flag] => 1 [number_of_packages] => 1 [drop_off_at_facility_indicator] => [hold_for_pickup_indicator] => [return_unfilterd_services] => [max_list] => )

) `

When I submit this zip code on ups api site, I get a response of destinationAmbiguous=true, which is fine, but the code is failing. Can you take a look please?

Thank you, John

abolabo commented 8 months ago

i think it's a bug in the API spec. Please post this issue on their repository https://github.com/UPS-API/api-documentation We just generating php-sdk based on their open-api specifications. Sorry, cannot help you.