- Adds the following functions
shipment.create_and_buy_lumashipment.buy_lumaluma.get_promise
- Corrects the endpoint used for creating/updating UPS accounts
See our Upgrade Guide for more details.
- Adds Ruby 3.4 support
- Adds the following functions to assist ReferralCustomers add credit cards and bank accounts:
beta_referral_customer.create_credit_card_client_secretbeta_referral_customer.create_bank_account_client_secretreferral_customer.add_credit_card_from_stripereferral_customer.add_bank_account_from_stripe
- Routes
AmazonShippingAccountto the proper create endpoint - Fixes error parsing
- Allows for alternative format of
errorsfield - Corrects available properties of an
EasyPostErrorandApiError(codeandfieldremoved fromEasyPostError,messageunfurled and explicitly added toApiError) - Removes unused
Errormodel
- Allows for alternative format of
- Corrects the HTTP verb for updating a brand from
GETtoPATCH - Removes deprecated
create_listtracker endpoint function as it is no longer available via API - Removes deprecated
user.all_api_keysanduser.api_keys, useapi_key.allandapi_key.retrieve_api_keys_for_userrespectively - Removes unmaintained and undocumented
irb - Removes unused
Rakefile - Bumps all dev dependencies
- 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
Claimservice for filing claims on EasyPost shipments and insurances
- Adds new
shipment.recommend_ship_date,smartrate.recommend_ship_date, andsmartrate.estimate_delivery_datefunctions - Routes
UpsAccount,UpsMailInnovationsAccount, andUpsSurepostAccountcreate/update requests to the new/ups_oauth_registrationsendpoint- 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
refundfunction in Insurance service for requesting a refund for standalone insurance.
- Fix issues funding wallet due to invalid internal function call
- Add
all_childrenandget_next_page_of_childreninuserservice
See our Upgrade Guide for more details.
- Removes
with_carbon_offsetparameter fromcreate,buyandregenerate_ratesmethods in the shipment service since now EasyPost offers carbon neutral shipments by default for free - Fixes a bug where the original filtering criteria of
allcalls wasn't passed along toget_next_pagecalls. Now, these are persisted via_paramskey on response objects - Removes the undocumented
create_and_buyfunction from the Batch service. The proper usage is to create a batch first and buy it separately
- Migrate API Key-related functions out of
userservice intoapi_keyservice, deprecating the old and introducing the new
- Add
carrier_typeservice +carrier_type.allmethod
- Fix endpoint for creating a FedEx Smartpost carrier account
- Adds hooks to introspect the request and response of API calls (see
HTTP Hookssection in the README for more details) - Maps 400 status code responses to the new
BadRequestErrorclass
- Fixes a bug where the params of a
customs_infoon 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
Clientobject with an API key. Optionally set open and read timeout params - Previous classes have been diverted into
ServicesandModels- 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.xtoclient.beta_x - References to
Referralare nowReferralCustomerandreferral_customerto match the API and docs - References to
smartrateare nowSmartRateandsmart_rateto match the API and docs- Rename function
get_smartratestoget_smart_rates - Rename function
get_lowest_smartratetoget_lowest_smart_rate
- Rename function
- Empty API response functions for
deletereturntrueinstead 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_datefunction in Shipment - Removes deprecated
endshipperbeta class, please use the GA oneEasyPost::Services::EndShipper
- Adds
get_next_pagefunction to each object which retrieves the next page of a collection when thehas_morekey is present in the response
- Adds beta
retrieve_stateless_ratesfunction - Adds
get_lowest_stateless_rateutility
- Added function to retrieve all pickups, accessible via
EasyPost::Pickup.all - Added payload functions
retrieve_all_payloadsandretrieve_payloadto retrieve all payloads or a specific payload for an event.
- Added new beta billing functionality for referral customer users, accessible via
EasyPost::Beta::Referraladd_payment_methodto add an existing Stripe bank account or credit card to your EasyPost accountrefund_by_amountrefunds you wallet balance by a specified amountrefund_by_payment_logrefunds you wallet balance by a specified payment log
- Fix bug where bank account and credit card payment methods were not deserializing to the
EasyPost::PaymentMethodclass
- Routes requests for creating a carrier account with a custom workflow (eg: FedEx, UPS) to the correct endpoint when using the
createfunction
- Concatenates
error.messageif it incorrectly comes back from the API as an array - Treats any HTTP status outside the
2xxrange as an error. Impact expected is minimal as this change only affects1xxand3xxHTTP status codes
- Adds support to buy a shipment by passing in
end_shipper_id with_carbon_offsetcan now alternatively be passed in theparamsparameter of theshipment.buyfunction- Migrates Partner White Label (Referrals) to general library namespace and deprecates beta functions
- Makes not implemented
allcalls match theEasyPost::Resourceinterface so that one can call.to_jsonon them and receive the proper error
- Moves EndShipper out of beta to the general library namespace
- Ensure the Easypost object will respond to
.idwhen 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_webhookfunction that returns your webhook or raises an error if there is awebhook_secretmismatch - Deprecated
PaymentMethodclass, please useBillingclass for retrieve all payment method function
- Adds ability to generate shipment forms via
generate_formfunction
- 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
patchinstead ofputunder the hood to better match API behavior and documentation. The behavior of these functions should remain the same
- Adds the
EndShipperBeta class withcreate,retrieve,all, andsavefunctions - 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 argumentserror
- Corrects the
Betanamespace 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
carrierparam fromAddress.create_and_verifyalong with the deadmessageconditional 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
Enumerableallowing for iterator patterns (#143)
- Bumps minimum Ruby version from
2.2to2.5 - Bumps dev dependencies
- Documents each interface of the project in code
- Overhauls the test suite with full coverage
- Introduces
Rubocopand lints the entire project - Removes the unusable
PrintandPrintJobobjects - Removes deprecated and unusable
stamp_and_barcode_by_referencemethod on the Batch object - Explicitly returns an error of "not implemented" for
Rate.allandParcel.all - Removes the
Shipment.get_ratesfunction as shipments already contain rates. If you need to get new rates for a shipment, use theShipment.regenerate_ratesfunction instead - Removes the parameters from
Address.verifyas they are unusable - Removes the deprecated
http_statusproperty of theEasyPost::Errorobject as it was replaced withstatus - Fixes a bug that would append an extra
idfield to each retrieved object - Various other small improvements and bug fixes
- Adds the
update_brandmethod to the user object (closes #122)
- Removed deprecated
Itemobject - Sorted EasyPost Resources list
- Remove 2015-vintage experimental
all_updatedmethod on Tracker - Fixes API key retrieval (#120, thanks @andychongyz)
- Adds
regenerate_ratesmethod for new rerate API - Adds
deconstruct_keysmethod to allow for pattern matching on EasyPost objects
- Adds
SmartRatefunctionality to theShipmentsobject (available by callingget_smartrateson a shipment) - Fix bug where
EasyPost::CarrierAccount.typeswas 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
carriersandservicesparameters 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_bodyonEasyPost::Errorobjects (#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
RestClientandMultiJson - 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').