JeremyDunn / php-fedex-api-wrapper

This library provides a fluid interface for constructing requests to the FedEx web service API.
269 stars 184 forks source link

TrackRequestProcessingOptionType::__toString() must return a string value #112

Closed joeybab3 closed 5 years ago

joeybab3 commented 5 years ago

Trying to set the processing options to send detailed scans yields the following error:

Catchable fatal error: Method FedEx\TrackService\SimpleType\TrackRequestProcessingOptionType::__toString() must return a string value in /vendor/jeremy-dunn/php-fedex-api-wrapper/src/FedEx/AbstractComplexType.php on line 109

To do the processing options, im using: $trackRequest->setProcessingOptions([new SimpleType\TrackRequestProcessingOptionType(TRUE)]);

joeybab3 commented 5 years ago

Once again, I'm just not doing my research and did it wrong. For anyone looking to do the same, the line that worked for me is:

$trackRequest->setProcessingOptions([SimpleType\TrackRequestProcessingOptionType::_INCLUDE_DETAILED_SCANS]);