- Removes the deprecated
create_list
tracker endpoint function as it is no longer available via API
- Send GET requests as query parameters instead of JSON body parameters
- Fix get_next_page_of_children function for User service with correct filter key
- Adds new
Claim
service for filing claims on EasyPost shipments and insurances
- Adds new
shipment.recommend_ship_date
,smartrate.recommend_ship_date
, andsmartrate.estimate_delivery_date
functions - Routes
UpsAccount
,UpsMailInnovationsAccount
, andUpsSurepostAccount
create/update requests to the new/ups_oauth_registrations
endpoint- Starting
2024-08-05
, UPS accounts will require a new payload to register or update. See UPS OAuth 2.0 Update for more details
- Starting
- Fix payment method funding and deletion failures due to undetermined payment method type
- Add
refund
function in Insurance service for requesting a refund for standalone insurance.
- Fix issues funding wallet due to invalid internal function call
- Add
all_children
andget_next_page_of_children
inuser
service
- Removes
with_carbon_offset
parameter fromcreate
,buy
andregenerate_rates
methods in the shipment service since now EasyPost offers carbon neutral shipments by default for free - Fixes a bug where the original filtering criteria of
all
calls wasn't passed along toget_next_page
calls. Now, these are persisted via_params
key on response objects - Removes the undocumented
create_and_buy
function from the Batch service. The proper usage is to create a batch first and buy it separately
- Migrate API Key-related functions out of
user
service intoapi_key
service, deprecating the old and introducing the new
- Add
carrier_type
service +carrier_type.all
method
- Fix endpoint for creating a FedEx Smartpost carrier account
- Adds hooks to introspect the request and response of API calls (see
HTTP Hooks
section in the README for more details) - Maps 400 status code responses to the new
BadRequestError
class
- Fixes a bug where the params of a
customs_info
on create weren't wrapped properly which led to an empty set ofcustoms_items
See our Upgrade Guide for more details.
- Library is now thread-safe. Closes GitHub Issue (#183)
- Initialize a
Client
object with an API key. Optionally set open and read timeout params - Previous classes have been diverted into
Services
andModels
- All methods (i.e.
create
,retrieve
,all
) exist in services, accessed via property of the client (eg:client.shipment.create()
)- E.g.
bought_shipment = client.shipment.buy(shipment_id, rate)
- E.g.
- All methods (i.e.
- Initialize a
- Beta namespace changed from
easypost.beta.x
toclient.beta_x
- References to
Referral
are nowReferralCustomer
andreferral_customer
to match the API and docs - References to
smartrate
are nowSmartRate
andsmart_rate
to match the API and docs- Rename function
get_smartrates
toget_smart_rates
- Rename function
get_lowest_smartrate
toget_lowest_smart_rate
- Rename function
- Empty API response functions for
delete
returntrue
instead of empty object - Drops support for Ruby 2.5
- Bumps all dev dependencies
- Improves Error Deserialization to dynamically handle edge cases that have a bad format
- Adds
retrieve_estimated_delivery_date
function in Shipment - Removes deprecated
endshipper
beta class, please use the GA oneEasyPost::Services::EndShipper
- Adds
get_next_page
function to each object which retrieves the next page of a collection when thehas_more
key is present in the response
- Adds beta
retrieve_stateless_rates
function - Adds
get_lowest_stateless_rate
utility
- Added function to retrieve all pickups, accessible via
EasyPost::Pickup.all
- Added payload functions
retrieve_all_payloads
andretrieve_payload
to retrieve all payloads or a specific payload for an event.
- Added new beta billing functionality for referral customer users, accessible via
EasyPost::Beta::Referral
add_payment_method
to add an existing Stripe bank account or credit card to your EasyPost accountrefund_by_amount
refunds you wallet balance by a specified amountrefund_by_payment_log
refunds you wallet balance by a specified payment log
- Fix bug where bank account and credit card payment methods were not deserializing to the
EasyPost::PaymentMethod
class
- Routes requests for creating a carrier account with a custom workflow (eg: FedEx, UPS) to the correct endpoint when using the
create
function
- Concatenates
error.message
if it incorrectly comes back from the API as an array - Treats any HTTP status outside the
2xx
range as an error. Impact expected is minimal as this change only affects1xx
and3xx
HTTP status codes
- Adds support to buy a shipment by passing in
end_shipper_id
with_carbon_offset
can now alternatively be passed in theparams
parameter of theshipment.buy
function- Migrates Partner White Label (Referrals) to general library namespace and deprecates beta functions
- Makes not implemented
all
calls match theEasyPost::Resource
interface so that one can call.to_json
on them and receive the proper error
- Moves EndShipper out of beta to the general library namespace
- Ensure the Easypost object will respond to
.id
when it has one in@values
- Adds Carbon Offset support
- Adds ability to create a shipment with carbon_offset
- Adds ability to buy a shipment with carbon_offset
- Adds ability to one-call-buy a shipment with carbon_offset
- Adds ability to rerate a shipment with carbon_offset
- Adds
validate_webhook
function that returns your webhook or raises an error if there is awebhook_secret
mismatch - Deprecated
PaymentMethod
class, please useBilling
class for retrieve all payment method function
- Adds ability to generate shipment forms via
generate_form
function
- Adds
Billing.retrieve_payment_methods()
,Billing.fund_wallet()
, andBilling.delete_payment_method()
functions - Captures OS information in the user-agent header for easier debugging
- Update functions now use
patch
instead ofput
under the hood to better match API behavior and documentation. The behavior of these functions should remain the same
- Adds the
EndShipper
Beta class withcreate
,retrieve
,all
, andsave
functions - Requests will now fail fast with an error if an API key is not provided instead of making a live API call with no key
- Fixes a bug where the library could not properly parse the response of deleting a child user
- Fixes a bug where you could not update a webhook due to a
wrong number of arguments
error
- Corrects the
Beta
namespace for the new Referral class
- Adds a
lowest_rate()
function to Orders and Pickups - Adds a
Shipment.get_lowest_smartrate()
function and ashipment.lowest_smartrate()
function - Removes the unusable
carrier
param fromAddress.create_and_verify
along with the deadmessage
conditional check - Add beta Referral class for White Label API with these new functions:
create()
,update_email()
,all()
, andadd_credit_card()
- Rolls back the original connection behavior of establishing a new connection for every request (restores previous expectations for multithreaded implementations)
- Fixes a bug that prematurely closed connections when using multithreading by wrapping requests in a mutex (closes #148)
- Adds support for custom client connections (#142)
- Reduces memory usage by reusing connections
- Extends all objects with
Enumerable
allowing for iterator patterns (#143)
- Bumps minimum Ruby version from
2.2
to2.5
- Bumps dev dependencies
- Documents each interface of the project in code
- Overhauls the test suite with full coverage
- Introduces
Rubocop
and lints the entire project - Removes the unusable
Print
andPrintJob
objects - Removes deprecated and unusable
stamp_and_barcode_by_reference
method on the Batch object - Explicitly returns an error of "not implemented" for
Rate.all
andParcel.all
- Removes the
Shipment.get_rates
function as shipments already contain rates. If you need to get new rates for a shipment, use theShipment.regenerate_rates
function instead - Removes the parameters from
Address.verify
as they are unusable - Removes the deprecated
http_status
property of theEasyPost::Error
object as it was replaced withstatus
- Fixes a bug that would append an extra
id
field to each retrieved object - Various other small improvements and bug fixes
- Adds the
update_brand
method to the user object (closes #122)
- Removed deprecated
Item
object - Sorted EasyPost Resources list
- Remove 2015-vintage experimental
all_updated
method on Tracker - Fixes API key retrieval (#120, thanks @andychongyz)
- Adds
regenerate_rates
method for new rerate API - Adds
deconstruct_keys
method to allow for pattern matching on EasyPost objects
- Adds
SmartRate
functionality to theShipments
object (available by callingget_smartrates
on a shipment) - Fix bug where
EasyPost::CarrierAccount.types
was hitting the wrong endpoint
- Replace Travis CI with Github Actions
- Add Ruby 3.0 to supported platforms (#110; thanks @maxwell)
- Fix attribute lookup when manually constructing objects (#105; thanks @drewtempelmeyer)
- Flatten class names and clean up some other style issues
- Fix
EasyPost::Address.create_and_verify
, broken since 3.1.0 (#108; thanks @rajbirverma)
- Don't modify params passed into Address#create (#78; thanks @TheRusskiy)
- Don't modify
carriers
andservices
parameters toShipment.lowest_rate
(#71 / #103, thanks @vladvinnikov and @jurisgalang) - When constructing an easypost object, convert the key to a string (#102; thanks @Geesu)
- Expose the raw HTTP response as
#http_body
onEasyPost::Error
objects (#101; thanks @Geesu)
- Fix bug causing Authorization header to be included in User-Agent header. All users must upgrade.
- Bad gem push. New version required.
- Fix bug where EasyPost.http_config was invalid when not explicitly initialized.
- Add Shipment Invoice and Refund Report
- Remove dependencies on
RestClient
andMultiJson
- Remove some deprecated endpoints
- Enforce TLS certificate validity by default
- Require use of ruby ~> 2.0 and TLSv1.2
- Fix bug with introduced around certain JSON objects with IDs (thanks vladvinnikov!)
- Removed unused and unsupported code paths for Container model
- Removed unused and unsupported code path for Stamp and Barcode methods on the Shipment model
- Fixed a bug with non-model JSON object with an "id" key being treated as models and raising errors
- Allow reports to be retrieved without passing a type
- Changed Report CRUD signatures. requires report type to be passed
- Added get_rates method for Orders
- Updated create method for ScanForms
- Add basic CRUD methods for Webhooks
- Add prefixes to report in utils
- Add report resource to ruby client
- Updated dependencies to allow rest-client 2.0.0 and above
- Added standalone Insurance model
- Allowed user creation for top-level users
- Added verify and verify_strict params to Address.create
- Added Tracker.create_list and Tracker.all_updated for working with large numbers of Trackers.
- Added new tests for Tracker.all
- Updated some old examples
- Added Cancel method for Pickups (thanks Ramie Blatt!)
- Fixed Address.create_and_verify and changed how errors are raised (thanks Dimitri Roche!)
- Require newer version of the multi_json package
- Added Address message accessor for backwards compatability
- Removed Address.message
- Add Printer and PrintJob resources.
- Bux fix, EasyPost::Errors no longer break with a nil json body.
- EasyPost::Errors now correctly parse field errors and error codes.
- CarrierAccount will now correctly save in-place modifications to credentials
- Nested variables should now be saved correctly across all models
- Fixed version numbering confusion (the previous version was 2.0.15, not 2.1.0)
- Added tracker to shipment buy response
- Updated tracker tests
- Added User and CarrierAccount models with CRUD functionality
- Added Pickup, PickupRate resources.
- Added ability to pass api_key to a few resources that were missing it.
- Added Item, Container, and Order resources.
- Fixed and added a lot of tests.
- Added Event.receive method for parsing events sent by webhook.
- Fixed tests to account for the tracking code returning and array of details instead of a Hash
- API Addition: Event resource added for webhook consumption.
- Interface Change: Changed batch.scan_form to batch.create_scan_form to support the ability to refer to scan forms associated to batches.
- API Addition: Tracker resource added. Trackers can be used to register any tracking code with EasyPost webhooks.
- API Addition: Shipment.track_with_code returns tracking details for any tracking code.
- API Addition: Address.create_and_verify returns a verified address in one step.
- API Addition: Shipment.label forces the creation of additional label formats (pdf, epl2, zpl).
- API Addition: Shipment.insure purchases insurance for a shipment.
- Library Update: Added the ability to negatively filter carriers and services with Shipment.lowest_rate (e.g. '!usps').