Skip to content

Commit

Permalink
Shipping documentation completed and some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
octante committed Feb 5, 2016
1 parent ef67be2 commit 7c2f28c
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 11 deletions.
17 changes: 8 additions & 9 deletions Resources/doc/locator.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,14 @@ The Locator class allows you to search for UPS Access Point locations.
$locatorRequest->setUnitOfMeasurement($unitOfMeasurement);

try {

// Get the locations
$locator = $this->getContainer()->get('ups.locator');
$locations = $locator->getLocations($locatorRequest, \Ups\Locator::OPTION_UPS_ACCESS_POINT_LOCATIONS);

foreach($locations->SearchResults->DropLocation as $location) {
// Your code here
var_dump($location);
}
// Get the locations
$locator = $this->getContainer()->get('ups.locator');
$locations = $locator->getLocations($locatorRequest, \Ups\Locator::OPTION_UPS_ACCESS_POINT_LOCATIONS);

foreach($locations->SearchResults->DropLocation as $location) {
// Your code here
var_dump($location);
}

} catch (Exception $e) {
var_dump($e);
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/quantumview.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The QuantumView Class allow you to request a Quantum View Data subscription.

```php

$quantumView = $this->getContainer()->ge('ups.quantumview');
$quantumView = $this->getContainer()->get('ups.quantumview');

try {
// Get the subscription for all events for the last hour
Expand Down
22 changes: 21 additions & 1 deletion Resources/doc/shipping.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## Shipping Class.

The Shipping Class allow you to ship a package using the UPS Tracking API. Shipping needs to steps, first you need to send
a confirm request and second an accept request.

<a name="tracking-class-example"></a>
### Example using Shipping class

``` php
<?php

Expand Down Expand Up @@ -120,4 +126,18 @@
} catch (Exception $e) {
$error = $e->getMessage();
}
```
```

<a name="tracking-class-parameters"></a>
### Parameters

Confirm parameters are:

* `validation` A UPS_Shipping::REQ_* constant (or null)
* `shipment` Shipment data container.
* `labelSpec` (Optional) LabelSpecification data
* `receiptSpec` (Optional) ShipmentRequestReceiptSpecification data.

Accept parameters are:

* `shipmentDigest` The UPS Shipment Digest received from a ShipConfirm request.

0 comments on commit 7c2f28c

Please sign in to comment.