Giter Club home page Giter Club logo

laravel-ups-api's Introduction

Laravel UPS Api

For Laravel 8, 9 and 10

Build Status StyleCI Status Software License Packagist Downloads Latest Version

Laravel UPS Api was created by, and is maintained by Pierre Tondereau, and PHP UPS Api was created by, and is maintained by Gabriel Bull at PHP UPS API.

Installation

To get the latest version of Laravel UPS Api, simply require the project using Composer:

$ composer require ptondereau/laravel-ups-api

Instead, you may of course manually update your require block and run composer update if you so choose:

{
    "require": {
        "ptondereau/laravel-ups-api": "^1.0"
    }
}

The UpsApiServiceProvider is auto-discovered and registered by default. If needed, you may register it manually by opening up config/app.php and adding the following to the providers key.

  • 'Ptondereau\LaravelUpsApi\UpsApiServiceProvider'

You can register all or some of the Ups facades in the aliases key of your config/app.php file if you like.

  • 'UpsAddressValidation' => 'Ptondereau\LaravelUpsApi\Facades\UpsAddressValidation'
  • 'UpsLocator' => 'Ptondereau\LaravelUpsApi\Facades\UpsLocator'
  • 'UpsQuantumView' => 'Ptondereau\LaravelUpsApi\Facades\UpsQuantumView'
  • 'UpsRate' => 'Ptondereau\LaravelUpsApi\Facades\UpsRate'
  • 'UpsTimeInTransit' => 'Ptondereau\LaravelUpsApi\Facades\UpsTimeInTransit'
  • 'UpsTracking' => 'Ptondereau\LaravelUpsApi\Facades\UpsTracking'
  • 'UpsTradeability' => 'Ptondereau\LaravelUpsApi\Facades\UpsTradeability'
  • 'UpsShipping' => 'Ptondereau\LaravelUpsApi\Facades\UpsShipping'
  • 'UpsRateInTransit' => 'Ptondereau\LaravelUpsApi\Facades\UpsRateInTransit'

Configuration

Laravel UPS Api requires connection configuration.

To get started, you'll need to publish all vendor assets:

$ php artisan vendor:publish --provider="Ptondereau\LaravelUpsApi\UpsApiServiceProvider"

This will create a config/ups.php file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases.

You also need to add env variables into your .env with your credentials:

UPS_ACCESS_KEY=key
UPS_USER_ID=userId
UPS_PASSWORD=password
UPS_SANDBOX=true

Usage

This package only inject and provide Facades for each class of PHP UPS API. You just have to read its documentation.

Further Information

There are other classes in this package that are not documented here. This is because they are not intended for public use and are used internally by this package.

Security

If you discover a security vulnerability within this package, please send an e-mail to Pierre Tondereau at [email protected]. All security vulnerabilities will be promptly addressed.

License

Laravel Ups Api is licensed under The MIT License (MIT).

laravel-ups-api's People

Contributors

djfrailey avatar ed-hanton-swytch avatar icweb avatar ivan-mosiev-altexsoft avatar nathangiesbrecht avatar ptondereau avatar vinkla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

laravel-ups-api's Issues

Undefiend getRate();

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;

Laravel 5.8.32 Support

Hey, I have been trying to get this installed into my project and looking around to find answers and have not found what I needed. I have a Laravel project using Laravel 5.8.32. Here is my Composer.json file

"require": {
        "php": "^7.1.3",
        "barryvdh/laravel-dompdf": "*",
        "beaudierman/ups": "1.*",
        "doctrine/dbal": "2.5.*",
        "fedeisas/laravel-mail-css-inliner": "@dev",
        "fideloper/proxy": "^4.0",
        "guzzlehttp/guzzle": "^6.3",
        "laravel/framework": "5.8.*",
        "laravel/tinker": "^1.0",
        "laravelcollective/html": "5.8.*",
        "maatwebsite/excel": "^3.1.8",
        "nicolaslopezj/searchable": "1.*",
        "nnnick/chartjs": "1.0.1.*@dev",
        "ptondereau/laravel-ups-api": "^1.0",
        "stichoza/google-translate-php": "~3.2",
        "torann/hashids": "2.0.*@dev",
        "twilio/sdk": "^5.34",
        "yajra/laravel-datatables-oracle": "~9.0"
    },
    "require-dev": {
        "barryvdh/laravel-ide-helper": "*",
        "beyondcode/laravel-dump-server": "^1.0",
        "filp/whoops": "^2.0",
        "fzaninotto/faker": "^1.4",
        "laravel/browser-kit-testing": "^2.0",
        "laravel/dusk": "^5.2",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "^3.0",
        "phpunit/phpunit": "^8.0"
    },
    "autoload": {
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "classmap": [
            "tests/Spec/BrowserKitTestCase.php"
        ],
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "scripts": {
        "post-create-project-cmd": [
            "@php -r \"copy('.env.example', '.env');\"",
            "@php artisan key:generate --ansi"
        ],
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true

The error I get is a big one, but the main thing ( I think ) is the

  Problem 1
    - Conclusion: remove laravel/framework v5.8.32
    - Conclusion: don't install laravel/framework v5.8.32

Please let me know if there is anything I am missing or if there is anything you need to help me out. Really appreciate your time! Thank you in advance!

new \Ups\Entity\Address();

There's no class for UPS entity. From what I'm seeing it appears this needs to be used to load up UPSAddressValidator etc. How would I use \UPS\Entity currently?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.