ptondereau / Laravel-UPS-Api

A small Laravel's wrapper for the PHP UPS API library
MIT License
34 stars 28 forks source link

Undefiend getRate(); #25

Open uwejan opened 2 years ago

uwejan commented 2 years ago

Followed the installation guide. On latest version of laravel. Error: Call to undefined method Ptondereau\LaravelUpsApi\Facades\UpsRate::getRate() Testing out the ; https://github.com/gabrielbull/php-ups-api#rate-class The following classes are imported;

use Ptondereau\LaravelUpsApi\Facades\UpsRate;
use Ups\Entity\Address;
use Ups\Entity\Dimensions;
use Ups\Entity\Package;
use Ups\Entity\PackagingType;
use Ups\Entity\ShipFrom;
use Ups\Entity\Shipment;
use Ups\Entity\UnitOfMeasurement;
shafrazkamil commented 2 years ago

Importing the Rate class worked for me.

use Ups\Rate;
$rate = new Rate(
            $accessKey,
            $userId,
            $password
        );
uwejan commented 2 years ago

If am to use Rate it means am not using any facade in this case. There is a problem with the library, i hope somebody can take a look.