Updates to the documentation example return values

pull/3/head
Troy Davisson 10 years ago
parent 1f98232ac0
commit 64dbeee35d

@ -74,32 +74,68 @@ $ups_rates = $ups->get_rates();
Output array sorted by cost: (in cents) Output array sorted by cost: (in cents)
```php ```php
array ( array(4) {
0 => [0] =>
array ( class pdt256\Shipping\Quote#56 (6) {
'code' => '03', protected $code =>
'name' => 'UPS Ground', string(2) "03"
'cost' => 1900, protected $name =>
), string(10) "UPS Ground"
1 => protected $cost =>
array ( int(1900)
'code' => '02', protected $transit_time =>
'name' => 'UPS 2nd Day Air', NULL
'cost' => 4900, protected $delivery_ts =>
), NULL
2 => protected $carrier =>
array ( string(3) "ups"
'code' => '13', }
'name' => 'UPS Next Day Air Saver', [1] =>
'cost' => 8900, class pdt256\Shipping\Quote#58 (6) {
), protected $code =>
3 => string(2) "02"
array ( protected $name =>
'code' => '01', string(15) "UPS 2nd Day Air"
'name' => 'UPS Next Day Air', protected $cost =>
'cost' => 9300, int(4900)
), protected $transit_time =>
) NULL
protected $delivery_ts =>
NULL
protected $carrier =>
string(3) "ups"
}
[2] =>
class pdt256\Shipping\Quote#57 (6) {
protected $code =>
string(2) "13"
protected $name =>
string(22) "UPS Next Day Air Saver"
protected $cost =>
int(8900)
protected $transit_time =>
NULL
protected $delivery_ts =>
NULL
protected $carrier =>
string(3) "ups"
}
[3] =>
class pdt256\Shipping\Quote#55 (6) {
protected $code =>
string(2) "01"
protected $name =>
string(16) "UPS Next Day Air"
protected $cost =>
int(9300)
protected $transit_time =>
NULL
protected $delivery_ts =>
NULL
protected $carrier =>
string(3) "ups"
}
}
``` ```
## USPS (Stub) Example ## USPS (Stub) Example
@ -126,20 +162,38 @@ $usps_rates = $usps->get_rates();
Output array sorted by cost: (in cents) Output array sorted by cost: (in cents)
```php ```php
array ( array(2) {
1 => [0] =>
array ( class pdt256\Shipping\Quote#30 (6) {
'code' => '4', protected $code =>
'name' => 'Parcel Post', string(1) "4"
'cost' => 1000, protected $name =>
), string(11) "Parcel Post"
0 => protected $cost =>
array ( int(1001)
'code' => '1', protected $transit_time =>
'name' => 'Priority Mail', NULL
'cost' => 1200, protected $delivery_ts =>
), NULL
) protected $carrier =>
string(4) "usps"
}
[1] =>
class pdt256\Shipping\Quote#26 (6) {
protected $code =>
string(1) "1"
protected $name =>
string(13) "Priority Mail"
protected $cost =>
int(1220)
protected $transit_time =>
NULL
protected $delivery_ts =>
NULL
protected $carrier =>
string(4) "usps"
}
}
``` ```
## Fedex (Stub) Example ## Fedex (Stub) Example
@ -172,40 +226,89 @@ $fedex_rates = $fedex->get_rates();
Output array sorted by cost: (in cents) Output array sorted by cost: (in cents)
```php ```php
array ( array(4) {
3 => [0] =>
array ( class pdt256\Shipping\Quote#65 (6) {
'code' => 'GROUND_HOME_DELIVERY', protected $code =>
'name' => 'Ground Home Delivery', string(20) "GROUND_HOME_DELIVERY"
'cost' => 1600, protected $name =>
'delivery_ts' => NULL, string(20) "Ground Home Delivery"
'transit_time' => 'THREE_DAYS', protected $cost =>
), int(1600)
2 => protected $transit_time =>
array ( string(10) "THREE_DAYS"
'code' => 'FEDEX_EXPRESS_SAVER', protected $delivery_ts =>
'name' => 'Fedex Express Saver', NULL
'cost' => 2900, protected $carrier =>
'delivery_ts' => '2014-09-30T20:00:00', string(5) "fedex"
'transit_time' => NULL, }
), [1] =>
1 => class pdt256\Shipping\Quote#63 (6) {
array ( protected $code =>
'code' => 'FEDEX_2_DAY', string(19) "FEDEX_EXPRESS_SAVER"
'name' => 'Fedex 2 Day', protected $name =>
'cost' => 4000, string(19) "Fedex Express Saver"
'delivery_ts' => '2014-09-29T20:00:00', protected $cost =>
'transit_time' => NULL, int(2900)
), protected $transit_time =>
0 => NULL
array ( protected $delivery_ts =>
'code' => 'STANDARD_OVERNIGHT', class Carbon\Carbon#23 (3) {
'name' => 'Standard Overnight', public $date =>
'cost' => 7800, string(26) "2014-09-30 20:00:00.000000"
'delivery_ts' => '2014-09-26T20:00:00', public $timezone_type =>
'transit_time' => NULL, int(3)
), public $timezone =>
) string(16) "America/New_York"
}
protected $carrier =>
string(5) "fedex"
}
[2] =>
class pdt256\Shipping\Quote#61 (6) {
protected $code =>
string(11) "FEDEX_2_DAY"
protected $name =>
string(11) "Fedex 2 Day"
protected $cost =>
int(4000)
protected $transit_time =>
NULL
protected $delivery_ts =>
class Carbon\Carbon#26 (3) {
public $date =>
string(26) "2014-09-29 20:00:00.000000"
public $timezone_type =>
int(3)
public $timezone =>
string(16) "America/New_York"
}
protected $carrier =>
string(5) "fedex"
}
[3] =>
class pdt256\Shipping\Quote#60 (6) {
protected $code =>
string(18) "STANDARD_OVERNIGHT"
protected $name =>
string(18) "Standard Overnight"
protected $cost =>
int(7800)
protected $transit_time =>
NULL
protected $delivery_ts =>
class Carbon\Carbon#58 (3) {
public $date =>
string(26) "2014-09-26 20:00:00.000000"
public $timezone_type =>
int(3)
public $timezone =>
string(16) "America/New_York"
}
protected $carrier =>
string(5) "fedex"
}
}
``` ```
### License ### License

Loading…
Cancel
Save