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

Fedex envelope packaging type example #71

Closed Jaicika closed 5 years ago

Jaicika commented 6 years ago

Hi,

I am having some issue while selecting Packaging Type as "Envelop". Its giving an error "There are no valid services available". Can you please provide me an example for the same so that I can get to know how to use it?

Thanks.

JeremyDunn commented 5 years ago

Try setting the PhysicalPackaging for your RequestedPackageLineItem.

Using the existing rate-request.php to get started: https://github.com/JeremyDunn/php-fedex-api-wrapper/blob/master/examples/rate-request.php#L60

You should be able to set the package type like so:

$rateRequest->RequestedShipment->RequestedPackageLineItems[0]->PhysicalPackaging = SimpleType\PhysicalPackagingType::_ENVELOPE