Created
March 30, 2017 23:23
-
-
Save maxheckel/d53aceb55545967e3fc182a3d79846b3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Services; | |
| use App\Order; | |
| use UPS\Client; | |
| class UPS{ | |
| private $client; | |
| public function __construct(Client $client){ | |
| $this->client = $client; | |
| } | |
| public function getStatus(Order $order){ | |
| $trackingNumber = $order->trackingNumber; | |
| $trackingData = $this->client->getTracking($trackingNumber); | |
| return $trackingData['order']['status']; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment