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 Ground Home Delivery Example #121

Closed nikunjsilvercayde closed 2 years ago

nikunjsilvercayde commented 4 years ago

Hello

I am trying to get Rate or Create Label in Fedex Ground Home Delivery options but it's showing me error of (Service type Ground Home Delivery must be designated as residential delivery.)

Can anyone please give me example of home delivery for where to pass this data?

nbokkisam commented 4 years ago

I am facing similar issue. Were you able to resolve? Thank You

nikjoshi96 commented 4 years ago

HI, Yes I got the answer for get and Create Label of Ground Home Delivery.

Here below is the examples.

For Rate Request.. if($address_type != '' && $address_type == 'RESIDENTIAL' && $service_type == 'GROUND_HOME_DELIVERY') { $rateRequest->RequestedShipment->Recipient->Address->Residential = TRUE; } For Create Label $recipientAddress = new \FedEx\ShipService\ComplexType\Address(); $recipientAddress ->setStreetLines([$address_street]) ->setCity($address_city) ->setStateOrProvinceCode($address_region) ->setPostalCode($address_zipcode) ->setCountryCode($address_contry);

    if($address_type != '' && $address_type == 'RESIDENTIAL')
    {
        $recipientAddress->setResidential(TRUE);
    }
github-actions[bot] commented 2 years ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 2 years ago

This issue was closed because it has been inactive for 14 days since being marked as stale.