- Adds
EndShipperID
shipment option - Adds support to pass an
EndShipperID
when buying a shipment - Add White Label support:
- Create a referral customer
- Update a referral customer's email address
- List all referral customers
- Add a credit card to a referral customer's account
- Adds
CreateEndShipper()
,GetEndShipper()
,ListEndShippers()
, andUpdateEndShippers()
functions - Adds
duty_payment
andduty_payment_account
to Shipment options
- Adds Carbon Offset support
- Adds the ability to create a shipment with carbon offset
- Adds the ability to buy a shipment with carbon offset
- Adds the ability to one-call-buy a shipment with carbon offset
- Adds the ability to re-rate a shipment with carbon offset
- Adds
ValidateWebhook
function that returns your webhook or raises an error if there is awebhook_secret
mismatch
- Add support for generating shipment forms via
GenerateShipmentForm
function
- Adds
RetrievePaymentMethods
,FundWallet
andDeletePaymentMethod
functions - Adds
BillingType
in CarrierAccount and Rate structs - Adds new lowest rate functions for Shipments, Orders and Pickups
- Adds new lowest smartrate functions for Shipments
- Adds OS details to the User-Agent header
- Adds support for webhook secrets
- Update methods now use
patch
instead ofput
behind the scenes to better match the API expectation and documentation. Update functions should still behave the same as before - Enforces passing an API key on each request (the library will now fail fast instead of sending an impossible-to-service HTTP request)
- Adds
Columns
andAdditionalColumns
params toReport
struct - Adds
Declaration
attribute inCustomsInfo
struct
- Adds missing
CreateAndVerifyAddress
andCreateAndVerifyAddressWithContext
functions
- Adds
CreateRefund
,CreateRefundWithContext
,ListRefunds
,ListRefundsWithContext
,GetRefund
, andGetRefundWithContext
in the Refund file - Adds missing
ID
attribute toBrand
struct - Fixes a bug where the
AddShipmentsToBatch
, andAddShipmentsToBatchWithContext
functions wouldn't allow a Shipment object to be passed by changing the params fromstring
tointerface{}
- Fixes a bug where the
RemoveShipmentsFromBatch
, andRemoveShipmentsFromBatchWithContext
functions wouldn't allow a Shipment IDs to be passed by changing the params from*Shipment
tointerface{}
- Fixes the return type of
ListBatchesResult
frombatch
toinsurance
- Fixes the HTTP method from
GET
toPOST
forGetBatchLabels
andGetBatchLabelsWithContext
- Adds comprehensive test coverage
- Corrects namespace for v2 release from
github.com/EasyPost/easypost-go
togithub.com/EasyPost/easypost-go/v2
NOTE: Do not use this release, use v2.0.1 or later due to this release being incorrectly packaged.
Upgrading major versions of this project? Refer to the Upgrade Guide.
- Bumps minimum Go version from
1.12
to1.15
- Bumps dependencies
- Lints the entire project
- adds a
client.RetrieveMe()
function to retrieve the authenticated user - Adds support to one-call buy an order by passing a
Service
andCarrierAccount
- Adds support to update user brand via
client.UpdateBrand()
- Adds support to create a list of trackers via
client.CreateTrackerList()
- Adds support for getting the lowest rate of a shipment via
client.LowestRate()
- Adds support to rerate a shipment via the
client.RerateShipment()
method - Adds a default timeout of 60 seconds to requests. This can be overridden by setting the
Client.Timeout
option in milliseconds - Fixed a spelling error for
origin_location
on the Tracker struct - Removed
GetShipmentRates()
andGetShipmentRatesWithContext()
methods since the shipment struct already has rates. If you need to get new rates for a shipment, please use theRerateShipment()
method instead - Adds a
SmartRate
struct since the structure of theRate
andSmartRate
objects are different (previously the SmartRate object borrowed the Rate struct)
- Adds support for
TaxIdentifiers
- Remove experimental undocumented methods
ListTrackersUpdated
andListTrackersUpdatedWithContext
- Corrects
CODAmount
from afloat64
to astring
- Adds
Smartrate
functionality to theShipments
object (available by callingGetShipmentSmartrates()
)
- Fix batch scan form functionality; replace GetBatchScanForms with CreateBatchScanForms
- Update example code.
- Add GetRate method and example.
- Remove ListCustomsInfos, ListCustomsItems, ListOrders and ListPickups methods.
- Add GetEvent, ListEvents and ListEventPayloads methods. Add example code for using these methods as well as using the Event type in a webhook handler.
- Fix issue in List actions that take query parameters
- Add shipment options for certified and registered mail.
- Changes to unit tests.
- Update URL in installation instructions.
- Properly format the carrier_accounts parameter in create shipment requests. Prior to this change, specifying a carrier account would result in a failed request. This removes the undocumented parameter from the CreateShipment and CreateShipmentWithContext methods, and adds a CarrierAccountIDs field to the Shipment struct type.
- Add proper struct tag to CarrierAccount.Fields so that it has the proper key name when serialized to JSON. Prior to this change, values in the Fields field were not recognized by the API.
- Initial release.