Skip to content

Commit

Permalink
update easypost library to v3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dleffler committed Dec 14, 2016
1 parent 6741b08 commit fdbf4f7
Show file tree
Hide file tree
Showing 34 changed files with 6,975 additions and 1 deletion.
136 changes: 136 additions & 0 deletions external/easypost-php-3.2.0/CHANGELOG
@@ -0,0 +1,136 @@
=== 3.2.0 2016-12-12

* Added ability to create Report objects for shipment, tracker and payment_log reports


=== 3.1.3 2016-10-25

* Fixed warning message from Address Verify/VerifyStrict


=== 3.1.2 2016-09-16

* Added create_list for trackers


=== 3.1.1 2016-07-21

* Added Insurance support


=== 3.1.0 2016-06-02

* Renamed "Resource" class to "EasypostResource" since Resource is reserved in PHP7 (thanks ccovey!)


=== 3.0.3 2016-02-22

* Added ability to create top-level users


=== 3.0.2 2016-01-29

* Added 'verify' and 'verify_strict' options to Address creation


=== 3.0.1 2016-01-05

* Updated ReadMe (thanks browner12!)
* Added DocBlock annotations to all methods (thanks browner12!)


=== 3.0.0 2015-12-18

* Fixed Shipment Retrieve by tracking_code


=== 2.1.2 2015-11-04

* Added Tracker.all example, and updated some old examples


=== 2.1.1 2015-07-01

* Removed cURL options for SSL version, timeout, and connect timeout. The
default values for these options are acceptable.


=== 2.1.0 2015-04-10

* Added User and CarrierAccount resources and examples for each.
* Modified EasyPost Object setter to record the change in the top level parent
object rather than the object that the change was made in. This allows you to
change sub objects and then call save() on the parent to have all properties
saved.
* Removed EasyPost Object transientValues and made unsavedValues act as a
representation of the params to send on save, rather than a flag to indicate
if a property had been changed.
* Added support for EasyPost's new error format: {"error": {"message": "...",
"code": ..., "errors": {...}}} as well as a prettyPrint function to better
display errors in development.
* Added support for additional HTTP methods PATCH and PUT.
* EasyPost Objects are now Iterable.


=== 2.0.12 2015-02-04

* Added pickup class
* Added pickup example


=== 2.0.11 2014-11-04

* Added tracker to shipment buy response
* Updated tracker examples


=== 2.0.10 2014-07-07

* Added Item, Container, and Order resources.


=== 2.0.9 2014-04-08

* Updated the CA cert bundle.


=== 2.0.8 2013-12-29

* Added the ability to add negative filters to Shipment->lowest_rate by starting them with an exclamation mark.


=== 2.0.7 2013-11-08

* Added endpoint to create shipment from tracking code.


=== 2.0.6 2013-10-21

* Added Event resource for webhooks.


=== 2.0.5 2013-08-30

* API Addition: Batch.buy method added. Trigger the purchasing of labels after a successful Batch.create.
* API Addition: Batch.scan_form method added. Quickly generate a scan_form for an entire batch.


=== 2.0.4 2013-07-31

* API Addition: Tracker objects added. Trackers can be used to register any tracking code with EasyPost webhooks.


=== 2.0.3 2013-07-16

* Bug fix: error messages should no longer be truncated to their first character.


=== 2.0.2 2013-07-05

* Added function to Address to all creating and verifying at the same time.


=== 2.0.1 2013-07-01

* Add label function to Shipment to request specific label file_formats (pdf, epl2, zpl).
* Add insure function to Shipment. Add insurance to any shipment in one call!
21 changes: 21 additions & 0 deletions external/easypost-php-3.2.0/LICENSE
@@ -0,0 +1,21 @@
The MIT License

Copyright (c) 2013 EasyPost (Simpler Postage, Inc)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
110 changes: 110 additions & 0 deletions external/easypost-php-3.2.0/README.md
@@ -0,0 +1,110 @@
# EasyPost PHP Client Library

EasyPost is a simple shipping API. You can sign up for an account at https://easypost.com

Installation
------------

There are two ways to install:

**Require Library**

```php
require_once("/path/to/lib/easypost.php");
```

**or via [Composer](http://getcomposer.org/):**

Create or add the following to composer.json in your project root:
```javascript
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/EasyPost/easypost-php"
}
],
"require": {
"easypost/easypost-php": "~3.0"
}
}
```

Install composer dependencies:
```shell
php composer.phar install
```

Require dependencies:
```php
require_once("/path/to/vendor/autoload.php");
```

*NOTE:* This library relies on the [mbstring](http://php.net/manual/en/book.mbstring.php) extension. Ensure you have it [installed](http://www.php.net/manual/en/mbstring.installation.php) correctly before using the library.

Example
-------

```php
require_once("path/to/vendor/autoload.php");
\EasyPost\EasyPost::setApiKey('cueqNZUb3ldeWTNX7MU3Mel8UXtaAMUi');

$to_address = \EasyPost\Address::create(
array(
"name" => "Dr. Steve Brule",
"street1" => "179 N Harbor Dr",
"city" => "Redondo Beach",
"state" => "CA",
"zip" => "90277",
"phone" => "310-808-5243"
)
);
$from_address = \EasyPost\Address::create(
array(
"company" => "EasyPost",
"street1" => "118 2nd Street",
"street2" => "4th Floor",
"city" => "San Francisco",
"state" => "CA",
"zip" => "94105",
"phone" => "415-456-7890"
)
);
$parcel = \EasyPost\Parcel::create(
array(
"predefined_package" => "LargeFlatRateBox",
"weight" => 76.9
)
);
$shipment = \EasyPost\Shipment::create(
array(
"to_address" => $to_address,
"from_address" => $from_address,
"parcel" => $parcel
)
);

$shipment->buy($shipment->lowest_rate());

$shipment->insure(array('amount' => 100));

echo $shipment->postage_label->label_url;
```

Documentation
--------------------

Up-to-date documentation at: https://www.easypost.com/docs

Tests
--------------------

Install dev dependencies:
```shell
php composer.phar install --dev
```

Run tests:
```shell
path/to/bin/phpunit
```
1 change: 1 addition & 0 deletions external/easypost-php-3.2.0/VERSION
@@ -0,0 +1 @@
3.2.0

0 comments on commit fdbf4f7

Please sign in to comment.