|
|
|
@ -1,5 +1,8 @@
|
|
|
|
|
<?php
|
|
|
|
|
use pdt256\Shipping\Package;
|
|
|
|
|
use pdt256\Shipping\Quote;
|
|
|
|
|
use pdt256\Shipping\Ship;
|
|
|
|
|
use pdt256\Shipping\Shipment;
|
|
|
|
|
use pdt256\Shipping\USPS;
|
|
|
|
|
use pdt256\Shipping\UPS;
|
|
|
|
|
use pdt256\Shipping\Fedex;
|
|
|
|
@ -7,23 +10,8 @@ use pdt256\Shipping\RateRequest;
|
|
|
|
|
|
|
|
|
|
class ShipTest extends PHPUnit_Framework_TestCase
|
|
|
|
|
{
|
|
|
|
|
public $shipment = [
|
|
|
|
|
'weight' => 3, // lbs
|
|
|
|
|
'dimensions' => [
|
|
|
|
|
'width' => 9,
|
|
|
|
|
'length' => 9,
|
|
|
|
|
'height' => 9,
|
|
|
|
|
],
|
|
|
|
|
'from' => [
|
|
|
|
|
'postal_code' => '90401',
|
|
|
|
|
'country_code' => 'US',
|
|
|
|
|
],
|
|
|
|
|
'to' => [
|
|
|
|
|
'postal_code' => '78703',
|
|
|
|
|
'country_code' => 'US',
|
|
|
|
|
'is_residential' => TRUE,
|
|
|
|
|
],
|
|
|
|
|
];
|
|
|
|
|
/** @var Shipment */
|
|
|
|
|
public $shipment;
|
|
|
|
|
|
|
|
|
|
public $shipping_options = [
|
|
|
|
|
'Standard Shipping' => [
|
|
|
|
@ -60,6 +48,27 @@ class ShipTest extends PHPUnit_Framework_TestCase
|
|
|
|
|
],
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
public function setUp()
|
|
|
|
|
{
|
|
|
|
|
$s = new Shipment;
|
|
|
|
|
$s->setFromStateProvinceCode('CA')
|
|
|
|
|
->setFromPostalCode('90401')
|
|
|
|
|
->setFromCountryCode('US')
|
|
|
|
|
->setToPostalCode('78703')
|
|
|
|
|
->setToCountryCode('US')
|
|
|
|
|
->setToResidential(true);
|
|
|
|
|
|
|
|
|
|
$p = new Package;
|
|
|
|
|
$p->setWeight(3)
|
|
|
|
|
->setWidth(9)
|
|
|
|
|
->setLength(9)
|
|
|
|
|
->setHeight(9);
|
|
|
|
|
|
|
|
|
|
$s->addPackage($p);
|
|
|
|
|
|
|
|
|
|
$this->shipment = $s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private function getUSPSOptions()
|
|
|
|
|
{
|
|
|
|
|
$ship = Ship::factory($this->shipping_options);
|
|
|
|
@ -69,10 +78,7 @@ class ShipTest extends PHPUnit_Framework_TestCase
|
|
|
|
|
'prod' => FALSE,
|
|
|
|
|
'username' => 'XXXX',
|
|
|
|
|
'password' => 'XXXX',
|
|
|
|
|
'shipment' => array_merge($this->shipment, [
|
|
|
|
|
'size' => 'LARGE',
|
|
|
|
|
'container' => 'RECTANGULAR',
|
|
|
|
|
]),
|
|
|
|
|
'shipment' => $this->shipment,
|
|
|
|
|
'approved_codes' => $approved_codes,
|
|
|
|
|
'request_adapter' => new RateRequest\StubUSPS(),
|
|
|
|
|
];
|
|
|
|
@ -107,9 +113,7 @@ class ShipTest extends PHPUnit_Framework_TestCase
|
|
|
|
|
'account_number' => 'XXXX',
|
|
|
|
|
'meter_number' => 'XXXX',
|
|
|
|
|
'drop_off_type' => 'BUSINESS_SERVICE_CENTER',
|
|
|
|
|
'shipment' => array_merge($this->shipment, [
|
|
|
|
|
'packaging_type' => 'YOUR_PACKAGING',
|
|
|
|
|
]),
|
|
|
|
|
'shipment' => $this->shipment,
|
|
|
|
|
'approved_codes' => $approved_codes,
|
|
|
|
|
'request_adapter' => new RateRequest\StubFedex(),
|
|
|
|
|
];
|
|
|
|
@ -120,18 +124,23 @@ class ShipTest extends PHPUnit_Framework_TestCase
|
|
|
|
|
$usps = new USPS\Rate($this->getUSPSOptions());
|
|
|
|
|
$usps_rates = $usps->get_rates();
|
|
|
|
|
|
|
|
|
|
$this->assertEquals(json_encode([
|
|
|
|
|
1 => [
|
|
|
|
|
'code' => '4',
|
|
|
|
|
'name' => 'Parcel Post',
|
|
|
|
|
'cost' => 1001,
|
|
|
|
|
],
|
|
|
|
|
0 => [
|
|
|
|
|
'code' => '1',
|
|
|
|
|
'name' => 'Priority Mail',
|
|
|
|
|
'cost' => 1220,
|
|
|
|
|
],
|
|
|
|
|
]), json_encode($usps_rates));
|
|
|
|
|
$post = new Quote;
|
|
|
|
|
$post
|
|
|
|
|
->setCarrier('usps')
|
|
|
|
|
->setCode(4)
|
|
|
|
|
->setName('Parcel Post')
|
|
|
|
|
->setCost(1001);
|
|
|
|
|
|
|
|
|
|
$priority = new Quote;
|
|
|
|
|
$priority
|
|
|
|
|
->setCarrier('usps')
|
|
|
|
|
->setCode(1)
|
|
|
|
|
->setName('Priority Mail')
|
|
|
|
|
->setCost(1220);
|
|
|
|
|
|
|
|
|
|
$expected_return = [$post, $priority];
|
|
|
|
|
|
|
|
|
|
$this->assertEquals($expected_return, $usps_rates);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function testUPSRate()
|
|
|
|
@ -139,28 +148,37 @@ class ShipTest extends PHPUnit_Framework_TestCase
|
|
|
|
|
$ups = new UPS\Rate($this->getUPSOptions());
|
|
|
|
|
$ups_rates = $ups->get_rates();
|
|
|
|
|
|
|
|
|
|
$this->assertEquals(json_encode([
|
|
|
|
|
0 => [
|
|
|
|
|
'code' => '03',
|
|
|
|
|
'name' => 'UPS Ground',
|
|
|
|
|
'cost' => 1910,
|
|
|
|
|
],
|
|
|
|
|
1 => [
|
|
|
|
|
'code' => '02',
|
|
|
|
|
'name' => 'UPS 2nd Day Air',
|
|
|
|
|
'cost' => 4923,
|
|
|
|
|
],
|
|
|
|
|
2 => [
|
|
|
|
|
'code' => '13',
|
|
|
|
|
'name' => 'UPS Next Day Air Saver',
|
|
|
|
|
'cost' => 8954,
|
|
|
|
|
],
|
|
|
|
|
3 => [
|
|
|
|
|
'code' => '01',
|
|
|
|
|
'name' => 'UPS Next Day Air',
|
|
|
|
|
'cost' => 9328,
|
|
|
|
|
],
|
|
|
|
|
]), json_encode($ups_rates));
|
|
|
|
|
$ground = new Quote;
|
|
|
|
|
$ground
|
|
|
|
|
->setCarrier('ups')
|
|
|
|
|
->setCode('03')
|
|
|
|
|
->setName('UPS Ground')
|
|
|
|
|
->setCost(1900);
|
|
|
|
|
|
|
|
|
|
$twodayair = new Quote;
|
|
|
|
|
$twodayair
|
|
|
|
|
->setCarrier('ups')
|
|
|
|
|
->setCode('02')
|
|
|
|
|
->setName('UPS 2nd Day Air')
|
|
|
|
|
->setCost(4900);
|
|
|
|
|
|
|
|
|
|
$nextdaysaver = new Quote;
|
|
|
|
|
$nextdaysaver
|
|
|
|
|
->setCarrier('ups')
|
|
|
|
|
->setCode('13')
|
|
|
|
|
->setName('UPS Next Day Air Saver')
|
|
|
|
|
->setCost(8900);
|
|
|
|
|
|
|
|
|
|
$nextdayair = new Quote;
|
|
|
|
|
$nextdayair
|
|
|
|
|
->setCarrier('ups')
|
|
|
|
|
->setCode('01')
|
|
|
|
|
->setName('UPS Next Day Air')
|
|
|
|
|
->setCost(9300);
|
|
|
|
|
|
|
|
|
|
$expected_return = [$ground, $twodayair, $nextdaysaver, $nextdayair];
|
|
|
|
|
|
|
|
|
|
$this->assertEquals($expected_return, $ups_rates);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function testFedexRate()
|
|
|
|
@ -168,36 +186,44 @@ class ShipTest extends PHPUnit_Framework_TestCase
|
|
|
|
|
$fedex = new Fedex\Rate($this->getFedexOptions());
|
|
|
|
|
$fedex_rates = $fedex->get_rates();
|
|
|
|
|
|
|
|
|
|
$this->assertEquals(json_encode([
|
|
|
|
|
3 => [
|
|
|
|
|
'code' => 'GROUND_HOME_DELIVERY',
|
|
|
|
|
'name' => 'Ground Home Delivery',
|
|
|
|
|
'cost' => 1655,
|
|
|
|
|
'delivery_ts' => NULL,
|
|
|
|
|
'transit_time' => 'THREE_DAYS',
|
|
|
|
|
],
|
|
|
|
|
2 => [
|
|
|
|
|
'code' => 'FEDEX_EXPRESS_SAVER',
|
|
|
|
|
'name' => 'Fedex Express Saver',
|
|
|
|
|
'cost' => 2989,
|
|
|
|
|
'delivery_ts' => '2014-09-30T20:00:00',
|
|
|
|
|
'transit_time' => NULL,
|
|
|
|
|
],
|
|
|
|
|
1 => [
|
|
|
|
|
'code' => 'FEDEX_2_DAY',
|
|
|
|
|
'name' => 'Fedex 2 Day',
|
|
|
|
|
'cost' => 4072,
|
|
|
|
|
'delivery_ts' => '2014-09-29T20:00:00',
|
|
|
|
|
'transit_time' => NULL,
|
|
|
|
|
],
|
|
|
|
|
0 => [
|
|
|
|
|
'code' => 'STANDARD_OVERNIGHT',
|
|
|
|
|
'name' => 'Standard Overnight',
|
|
|
|
|
'cost' => 7834,
|
|
|
|
|
'delivery_ts' => '2014-09-26T20:00:00',
|
|
|
|
|
'transit_time' => NULL,
|
|
|
|
|
],
|
|
|
|
|
]), json_encode($fedex_rates));
|
|
|
|
|
$ground = new Quote;
|
|
|
|
|
$ground
|
|
|
|
|
->setCarrier('fedex')
|
|
|
|
|
->setCode('GROUND_HOME_DELIVERY')
|
|
|
|
|
->setName('Ground Home Delivery')
|
|
|
|
|
->setCost(1600)
|
|
|
|
|
->setTransitTime('THREE_DAYS');
|
|
|
|
|
|
|
|
|
|
$express = new Quote;
|
|
|
|
|
$express
|
|
|
|
|
->setCarrier('fedex')
|
|
|
|
|
->setCode('FEDEX_EXPRESS_SAVER')
|
|
|
|
|
->setName('Fedex Express Saver')
|
|
|
|
|
->setCost(2900)
|
|
|
|
|
->setDeliveryEstimate(new DateTime('2014-09-30T20:00:00'))
|
|
|
|
|
->setTransitTime(null);
|
|
|
|
|
|
|
|
|
|
$secondday = new Quote;
|
|
|
|
|
$secondday
|
|
|
|
|
->setCarrier('fedex')
|
|
|
|
|
->setCode('FEDEX_2_DAY')
|
|
|
|
|
->setName('Fedex 2 Day')
|
|
|
|
|
->setCost(4000)
|
|
|
|
|
->setDeliveryEstimate(new DateTime('2014-09-29T20:00:00'))
|
|
|
|
|
->setTransitTime(null);
|
|
|
|
|
|
|
|
|
|
$overnight = new Quote;
|
|
|
|
|
$overnight
|
|
|
|
|
->setCarrier('fedex')
|
|
|
|
|
->setCode('STANDARD_OVERNIGHT')
|
|
|
|
|
->setName('Standard Overnight')
|
|
|
|
|
->setCost(7800)
|
|
|
|
|
->setDeliveryEstimate(new DateTime('2014-09-26T20:00:00'))
|
|
|
|
|
->setTransitTime(null);
|
|
|
|
|
|
|
|
|
|
$expected_result = [$ground, $express, $secondday, $overnight];
|
|
|
|
|
|
|
|
|
|
$this->assertEquals($expected_result, $fedex_rates);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function testDisplayOptions()
|
|
|
|
@ -216,210 +242,36 @@ class ShipTest extends PHPUnit_Framework_TestCase
|
|
|
|
|
$ship = Ship::factory($this->shipping_options);
|
|
|
|
|
$display_rates = $ship->get_display_rates($rates);
|
|
|
|
|
|
|
|
|
|
$this->assertEquals(json_encode([
|
|
|
|
|
$post = new Quote;
|
|
|
|
|
$post->setCode(4)
|
|
|
|
|
->setName('Parcel Post')
|
|
|
|
|
->setCost(1001)
|
|
|
|
|
->setCarrier('usps');
|
|
|
|
|
|
|
|
|
|
$fedex_two_day = new Quote;
|
|
|
|
|
$fedex_two_day->setCode('FEDEX_2_DAY')
|
|
|
|
|
->setName('Fedex 2 Day')
|
|
|
|
|
->setCost(4000)
|
|
|
|
|
->setDeliveryEstimate(new DateTime('2014-09-29T20:00:00'))
|
|
|
|
|
->setCarrier('fedex');
|
|
|
|
|
|
|
|
|
|
$overnight = new Quote;
|
|
|
|
|
$overnight->setCode('STANDARD_OVERNIGHT')
|
|
|
|
|
->setName('Standard Overnight')
|
|
|
|
|
->setCost(7800)
|
|
|
|
|
->setDeliveryEstimate(new DateTime('2014-09-26T20:00:00'))
|
|
|
|
|
->setCarrier('fedex');
|
|
|
|
|
|
|
|
|
|
$this->assertEquals([
|
|
|
|
|
'Standard Shipping' => [
|
|
|
|
|
0 => [
|
|
|
|
|
'code' => '4',
|
|
|
|
|
'name' => 'Parcel Post',
|
|
|
|
|
'cost' => 1001,
|
|
|
|
|
'carrier' => 'usps',
|
|
|
|
|
],
|
|
|
|
|
$post,
|
|
|
|
|
],
|
|
|
|
|
'Two-Day Shipping' => [
|
|
|
|
|
0 => [
|
|
|
|
|
'code' => 'FEDEX_2_DAY',
|
|
|
|
|
'name' => 'Fedex 2 Day',
|
|
|
|
|
'cost' => 4072,
|
|
|
|
|
'delivery_ts' => '2014-09-29T20:00:00',
|
|
|
|
|
'transit_time' => NULL,
|
|
|
|
|
'carrier' => 'fedex',
|
|
|
|
|
],
|
|
|
|
|
$fedex_two_day,
|
|
|
|
|
],
|
|
|
|
|
'One-Day Shipping' => [
|
|
|
|
|
0 => [
|
|
|
|
|
'code' => 'STANDARD_OVERNIGHT',
|
|
|
|
|
'name' => 'Standard Overnight',
|
|
|
|
|
'cost' => 7834,
|
|
|
|
|
'delivery_ts' => '2014-09-26T20:00:00',
|
|
|
|
|
'transit_time' => NULL,
|
|
|
|
|
'carrier' => 'fedex',
|
|
|
|
|
],
|
|
|
|
|
$overnight,
|
|
|
|
|
],
|
|
|
|
|
]), json_encode($display_rates));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @expectedException Exception
|
|
|
|
|
*/
|
|
|
|
|
public function testUSPSRateMissingTo()
|
|
|
|
|
{
|
|
|
|
|
$usps_options = $this->getUSPSOptions();
|
|
|
|
|
unset($usps_options['shipment']['to']);
|
|
|
|
|
|
|
|
|
|
$usps = new USPS\Rate($usps_options);
|
|
|
|
|
$usps_rates = $usps->get_rates();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @expectedException Exception
|
|
|
|
|
*/
|
|
|
|
|
public function testUSPSRateMissingFrom()
|
|
|
|
|
{
|
|
|
|
|
$usps_options = $this->getUSPSOptions();
|
|
|
|
|
unset($usps_options['shipment']['from']);
|
|
|
|
|
|
|
|
|
|
$usps = new USPS\Rate($usps_options);
|
|
|
|
|
$usps_rates = $usps->get_rates();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @expectedException Exception
|
|
|
|
|
*/
|
|
|
|
|
public function testUSPSRateMissingDimensions()
|
|
|
|
|
{
|
|
|
|
|
$usps_options = $this->getUSPSOptions();
|
|
|
|
|
unset($usps_options['shipment']['dimensions']);
|
|
|
|
|
|
|
|
|
|
$usps = new USPS\Rate($usps_options);
|
|
|
|
|
$usps_rates = $usps->get_rates();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @expectedException Exception
|
|
|
|
|
*/
|
|
|
|
|
public function testUPSRateMissingTo()
|
|
|
|
|
{
|
|
|
|
|
$ups_options = $this->getUPSOptions();
|
|
|
|
|
unset($ups_options['shipment']['to']);
|
|
|
|
|
|
|
|
|
|
$ups = new UPS\Rate($ups_options);
|
|
|
|
|
$ups_rates = $ups->get_rates();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @expectedException Exception
|
|
|
|
|
*/
|
|
|
|
|
public function testUPSRateMissingFrom()
|
|
|
|
|
{
|
|
|
|
|
$ups_options = $this->getUPSOptions();
|
|
|
|
|
unset($ups_options['shipment']['from']);
|
|
|
|
|
|
|
|
|
|
$ups = new UPS\Rate($ups_options);
|
|
|
|
|
$ups_rates = $ups->get_rates();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @expectedException Exception
|
|
|
|
|
*/
|
|
|
|
|
public function testUPSRateMissingDimensions()
|
|
|
|
|
{
|
|
|
|
|
$ups_options = $this->getUPSOptions();
|
|
|
|
|
unset($ups_options['shipment']['dimensions']);
|
|
|
|
|
|
|
|
|
|
$ups = new UPS\Rate($ups_options);
|
|
|
|
|
$ups_rates = $ups->get_rates();
|
|
|
|
|
], $display_rates);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @expectedException Exception
|
|
|
|
|
*/
|
|
|
|
|
public function testFedexRateMissingTo()
|
|
|
|
|
{
|
|
|
|
|
$fedex_options = $this->getFedexOptions();
|
|
|
|
|
unset($fedex_options['shipment']['to']);
|
|
|
|
|
|
|
|
|
|
$fedex = new Fedex\Rate($fedex_options);
|
|
|
|
|
$fedex_rates = $fedex->get_rates();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @expectedException Exception
|
|
|
|
|
*/
|
|
|
|
|
public function testFedexRateMissingFrom()
|
|
|
|
|
{
|
|
|
|
|
$fedex_options = $this->getFedexOptions();
|
|
|
|
|
unset($fedex_options['shipment']['from']);
|
|
|
|
|
|
|
|
|
|
$fedex = new Fedex\Rate($fedex_options);
|
|
|
|
|
$fedex_rates = $fedex->get_rates();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @expectedException Exception
|
|
|
|
|
*/
|
|
|
|
|
public function testFedexRateMissingDimensions()
|
|
|
|
|
{
|
|
|
|
|
$fedex_options = $this->getFedexOptions();
|
|
|
|
|
unset($fedex_options['shipment']['dimensions']);
|
|
|
|
|
|
|
|
|
|
$fedex = new Fedex\Rate($fedex_options);
|
|
|
|
|
$fedex_rates = $fedex->get_rates();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// // Readme Examples:
|
|
|
|
|
// public function testUSPSReadmeExample()
|
|
|
|
|
// {
|
|
|
|
|
// $usps = new USPS\Rate([
|
|
|
|
|
// 'prod' => FALSE,
|
|
|
|
|
// 'username' => 'XXXX',
|
|
|
|
|
// 'password' => 'XXXX',
|
|
|
|
|
// 'shipment' => array_merge($this->shipment, [
|
|
|
|
|
// 'size' => 'LARGE',
|
|
|
|
|
// 'container' => 'RECTANGULAR',
|
|
|
|
|
// ]),
|
|
|
|
|
// 'approved_codes' => [
|
|
|
|
|
// '1', // 1-3 business days
|
|
|
|
|
// '4', // 2-8 business days
|
|
|
|
|
// ],
|
|
|
|
|
// 'request_adapter' => new RateRequest\StubUSPS(),
|
|
|
|
|
// ]);
|
|
|
|
|
//
|
|
|
|
|
// $usps_rates = $usps->get_rates();
|
|
|
|
|
// var_export($usps_rates);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public function testUPSReadmeExample()
|
|
|
|
|
// {
|
|
|
|
|
// $ups = new UPS\Rate([
|
|
|
|
|
// 'prod' => FALSE,
|
|
|
|
|
// 'shipment' => $this->shipment,
|
|
|
|
|
// 'approved_codes' => [
|
|
|
|
|
// '03', // 1-5 business days
|
|
|
|
|
// '02', // 2 business days
|
|
|
|
|
// '01', // next business day 10:30am
|
|
|
|
|
// '13', // next business day by 3pm
|
|
|
|
|
// '14', // next business day by 8am
|
|
|
|
|
// ],
|
|
|
|
|
// 'request_adapter' => new RateRequest\StubUPS(),
|
|
|
|
|
// ]);
|
|
|
|
|
//
|
|
|
|
|
// $ups_rates = $ups->get_rates();
|
|
|
|
|
// var_export($ups_rates);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public function testFedexReadmeExample()
|
|
|
|
|
// {
|
|
|
|
|
// $fedex = new Fedex\Rate([
|
|
|
|
|
// 'prod' => FALSE,
|
|
|
|
|
// 'key' => 'XXXX',
|
|
|
|
|
// 'password' => 'XXXX',
|
|
|
|
|
// 'account_number' => 'XXXX',
|
|
|
|
|
// 'meter_number' => 'XXXX',
|
|
|
|
|
// 'drop_off_type' => 'BUSINESS_SERVICE_CENTER',
|
|
|
|
|
// 'shipment' => array_merge($this->shipment, [
|
|
|
|
|
// 'packaging_type' => 'YOUR_PACKAGING',
|
|
|
|
|
// ]),
|
|
|
|
|
// 'approved_codes' => [
|
|
|
|
|
// 'FEDEX_EXPRESS_SAVER', // 1-3 business days
|
|
|
|
|
// 'FEDEX_GROUND', // 1-5 business days
|
|
|
|
|
// 'GROUND_HOME_DELIVERY', // 1-5 business days
|
|
|
|
|
// 'FEDEX_2_DAY', // 2 business days
|
|
|
|
|
// 'STANDARD_OVERNIGHT', // overnight
|
|
|
|
|
// ],
|
|
|
|
|
// 'request_adapter' => new RateRequest\StubFedex(),
|
|
|
|
|
// ]);
|
|
|
|
|
//
|
|
|
|
|
// $fedex_rates = $fedex->get_rates();
|
|
|
|
|
// var_export($fedex_rates);
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|