Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Next Release

- Adds `surcharges` to `Rate` and a `Surcharge` model
- Removes the deprecated, unusable `addCreditCard` function
- Stripe has disabled the ability to pass plain credit card details over the wire and now requires using [Stripe.js/Elements/Checkout](https://support.stripe.com/questions/card-tokenization-restrictions-using-publishable-keys). Follow the [Decentralized (EasyPost-Manage Billing) Guide](https://docs.easypost.com/guides/get-started-with-forge/easypost-managed-billing-guide#referralcustomer-billing-management) for more details on the new flow to use.
- Makes `referralCustomer.retrieveEasypostStripeApiKey` public to help facilitate adding credit cards using Stripe.js
Expand Down
1 change: 1 addition & 0 deletions lib/EasyPost/Rate.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* @property int $delivery_days
* @property string $delivery_date
* @property bool $delivery_date_guaranteed
* @property Surcharge[] $surcharges
* @property string $created_at
* @property string $updated_at
*/
Expand Down
17 changes: 17 additions & 0 deletions lib/EasyPost/Surcharge.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace EasyPost;

/**
* @package EasyPost
* @property string $object
* @property string $type
* @property string $category
* @property string $amount
* @property string $list_amount
* @property string $retail_amount
* @property string $currency
*/
class Surcharge extends EasyPostObject
{
}
2 changes: 2 additions & 0 deletions lib/EasyPost/Util/InternalUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
use EasyPost\Report;
use EasyPost\ScanForm;
use EasyPost\Shipment;
use EasyPost\Surcharge;
use EasyPost\TaxIdentifier;
use EasyPost\Tracker;
use EasyPost\TrackingDetail;
Expand Down Expand Up @@ -65,6 +66,7 @@
'Shipment' => Shipment::class,
'ShipmentInvoiceReport' => Report::class,
'ShipmentReport' => Report::class,
'Surcharge' => Surcharge::class,
'TaxIdentifier' => TaxIdentifier::class,
'Tracker' => Tracker::class,
'TrackerReport' => Report::class,
Expand Down
1 change: 1 addition & 0 deletions lib/easypost.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
require_once(dirname(__FILE__) . '/EasyPost/Report.php');
require_once(dirname(__FILE__) . '/EasyPost/ScanForm.php');
require_once(dirname(__FILE__) . '/EasyPost/Shipment.php');
require_once(dirname(__FILE__) . '/EasyPost/Surcharge.php');
require_once(dirname(__FILE__) . '/EasyPost/TaxIdentifier.php');
require_once(dirname(__FILE__) . '/EasyPost/Tracker.php');
require_once(dirname(__FILE__) . '/EasyPost/TrackingDetail.php');
Expand Down
Loading