Skip to content

Instantly share code, notes, and snippets.

@maxheckel
Created March 30, 2017 23:23
Show Gist options
  • Select an option

  • Save maxheckel/d53aceb55545967e3fc182a3d79846b3 to your computer and use it in GitHub Desktop.

Select an option

Save maxheckel/d53aceb55545967e3fc182a3d79846b3 to your computer and use it in GitHub Desktop.
<?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