gabrielbull / php-ups-api

PHP Wrapper for all UPS API
MIT License
456 stars 255 forks source link

Call to undefined method Ups\RateTimeInTransit::setPickupType() #268

Closed AnnoyingTechnology closed 4 years ago

AnnoyingTechnology commented 4 years ago

Hi,

I have an issue where I get 4x the normal rates, using the API. UPS support said it was caused by the PickupType being 01 daily, when the account actually states occasional. I found a PickupType entity, which uses 01 as default and has a setCode() method, there is a setPickupType() on the RateRequest, but when I try

(new Ups\RateTimeInTransit)
    ->setPickupType(
        (new \Ups\Entity\PickupType)
            ->setCode(\Ups\Entity\PickupType::PKT_ONETIME)
    );

I get Call to undefined method Ups\RateTimeInTransit::setPickupType()

Thanks for your help !

edit: this method isn't in $shipment either. It's apparently in the RateRequest object, but I can't find/access it. It's not in the DeliveryTimeInformation either, contrary to setPickup(), which is.

AnnoyingTechnology commented 4 years ago

related to https://github.com/gabrielbull/php-ups-api/issues/215

gabrielbull commented 4 years ago

@AnnoyingTechnology This library has no maintainer and is looking for one.