diff --git a/CHANGELOG.md b/CHANGELOG.md index dc76bfef..49c94605 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Removes the deprecated, unusable `add_credit_card` 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 `referral_customer.retrieve_easypost_stripe_api_key` public to help facilitate adding credit cards using Stripe.js +- Adds support for `FedexDefaultAccount`, `GofoWalletAccount`, `UpsDapAccount`, `UniUniWalletAccount`, and `VehoWalletAccount` by properly routing carrier-account create requests to the `/carrier_accounts/open` endpoint. ## v7.7.0 (2026-06-25) diff --git a/lib/easypost/services/carrier_account.rb b/lib/easypost/services/carrier_account.rb index d8f6b33a..e20239a4 100644 --- a/lib/easypost/services/carrier_account.rb +++ b/lib/easypost/services/carrier_account.rb @@ -1,26 +1,34 @@ # frozen_string_literal: true class EasyPost::Services::CarrierAccount < EasyPost::Services::Service - CUSTOM_WORKFLOW_CARRIER_TYPES = %w[FedexAccount FedexSmartpostAccount].freeze - CARRIER_ACCOUNT_TYPES_WITH_CUSTOM_OAUTH = %w[ - AmazonShippingAccount UpsAccount UpsMailInnovationsAccount - UpsSurepostAccount UspsShipAccount - ].freeze + CARRIER_ACCOUNT_CREATE_ENDPOINT_TYPES = { + 'carrier_accounts/open' => %w[ + FedexDefaultAccount + GofoWalletAccount + UpsDapAccount + UniUniWalletAccount + VehoWalletAccount + ].freeze, + 'carrier_accounts/register' => %w[ + FedexAccount + FedexSmartpostAccount + ].freeze, + 'carrier_accounts/register_oauth' => %w[ + AmazonShippingAccount + UpsAccount + UpsMailInnovationsAccount + UpsSurepostAccount + UspsShipAccount + ].freeze, + }.freeze MODEL_CLASS = EasyPost::Models::CarrierAccount # :nodoc: # Create a carrier account def create(params = {}) carrier_account_type = params[:type] - wrapped_params = { select_top_layer_key(carrier_account_type).to_sym => params } + create_url = select_carrier_account_creation_endpoint(carrier_account_type) + wrapped_params = { select_top_layer_key(create_url).to_sym => params } - # For UPS and FedEx the endpoint is different - create_url = if CUSTOM_WORKFLOW_CARRIER_TYPES.include?(carrier_account_type) - 'carrier_accounts/register' - elsif CARRIER_ACCOUNT_TYPES_WITH_CUSTOM_OAUTH.include?(carrier_account_type) - 'carrier_accounts/register_oauth' - else - 'carrier_accounts' - end response = @client.make_request(:post, create_url, wrapped_params) EasyPost::InternalUtilities::Json.convert_json_to_object(response, MODEL_CLASS) @@ -57,12 +65,21 @@ def delete(id) private - # Select the top-layer key for the carrier account creation/update request based on the carrier type. - def select_top_layer_key(carrier_account_type) - if CARRIER_ACCOUNT_TYPES_WITH_CUSTOM_OAUTH.include?(carrier_account_type) + # Select the top-layer key for the carrier account creation/update request based on the create endpoint. + def select_top_layer_key(create_url) + if create_url == 'carrier_accounts/register_oauth' 'carrier_account_oauth_registrations' else 'carrier_account' end end + + # Determines which API endpoint to use for the creation call. + def select_carrier_account_creation_endpoint(carrier_account_type) + CARRIER_ACCOUNT_CREATE_ENDPOINT_TYPES.each do |endpoint, carrier_account_types| + return endpoint if carrier_account_types.include?(carrier_account_type) + end + + 'carrier_accounts' + end end diff --git a/spec/carrier_account_spec.rb b/spec/carrier_account_spec.rb index edf13a9f..4606d550 100644 --- a/spec/carrier_account_spec.rb +++ b/spec/carrier_account_spec.rb @@ -17,39 +17,46 @@ client.carrier_account.delete(carrier_account.id) end - it 'creates a UPS account' do - carrier_account = client.carrier_account.create({ type: 'UpsAccount', account_number: '123456789' }) - - expect(carrier_account).to be_an_instance_of(EasyPost::Models::CarrierAccount) - expect(carrier_account.id).to match('ca_') - expect(carrier_account.type).to eq('UpsAccount') - - # Remove the carrier account once we have tested it so we don't pollute the account with test accounts - client.carrier_account.delete(carrier_account.id) - end - - it 'creates a FedEx account' do - expect { - client.carrier_account.create({ type: 'FedexAccount', registration_data: {} }) - }.to raise_error(EasyPost::Errors::ApiError) { |error| - expect(error.status_code).to eq(422) - expect( - error.errors.any? do |err| - err['field'] == 'account_number' && err['message'] == 'must be present and a string' - end, - ).to be true - } - end - - it 'creates an Amazon account' do - carrier_account = client.carrier_account.create({ type: 'AmazonShippingAccount', account_number: '123456789' }) - - expect(carrier_account).to be_an_instance_of(EasyPost::Models::CarrierAccount) - expect(carrier_account.id).to match('ca_') - expect(carrier_account.type).to eq('AmazonShippingAccount') - - # Remove the carrier account once we have tested it so we don't pollute the account with test accounts - client.carrier_account.delete(carrier_account.id) + EasyPost::Services::CarrierAccount::CARRIER_ACCOUNT_CREATE_ENDPOINT_TYPES.each do |expected_endpoint, + carrier_account_types| + carrier_account_types.each do |carrier_account_type| + it "routes #{carrier_account_type} account creation" do + params = { type: carrier_account_type } + if %w[carrier_accounts/open carrier_accounts/register].include?(expected_endpoint) + params[:registration_data] = {} + end + captured_request = {} + + allow(client).to receive(:make_request).and_wrap_original do |original, *args| + method, endpoint, request_params = args + if captured_request[:endpoint].nil? && endpoint.start_with?('carrier_accounts') + captured_request[:method] = method + captured_request[:endpoint] = endpoint + captured_request[:params] = request_params + end + original.call(*args) + end + + begin + carrier_account = client.carrier_account.create(params) + rescue EasyPost::Errors::ApiError => e + expect(e.status_code).not_to eq(404) + expect(e.status_code).not_to eq(500) + else + expect(carrier_account).to be_an_instance_of(EasyPost::Models::CarrierAccount) + expect(carrier_account.id).to match('ca_') + client.carrier_account.delete(carrier_account.id) + end + + expect(captured_request[:method]).to eq(:post) + expect(captured_request[:endpoint]).to eq(expected_endpoint) + if expected_endpoint == 'carrier_accounts/register_oauth' + expect(captured_request[:params]).to have_key(:carrier_account_oauth_registrations) + else + expect(captured_request[:params]).to have_key(:carrier_account) + end + end + end end end @@ -89,19 +96,6 @@ # Remove the carrier account once we have tested it so we don't pollute the account with test accounts client.carrier_account.delete(carrier_account.id) end - - it 'updates an ups account' do - ups_account = client.carrier_account.create({ type: 'UpsAccount', account_number: '123456789' }) - - updated_ups_account = client.carrier_account.update(ups_account.id, account_number: '987654321') - - expect(updated_ups_account).to be_an_instance_of(EasyPost::Models::CarrierAccount) - expect(updated_ups_account.id).to match('ca_') - expect(updated_ups_account.type).to eq('UpsAccount') - - # Remove the carrier account once we have tested it so we don't pollute the account with test accounts - client.carrier_account.delete(ups_account.id) - end end describe '.delete' do diff --git a/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_AmazonShippingAccount_account_creation.yml b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_AmazonShippingAccount_account_creation.yml new file mode 100644 index 00000000..64fd8746 --- /dev/null +++ b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_AmazonShippingAccount_account_creation.yml @@ -0,0 +1,138 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.easypost.com/v2/carrier_accounts/register_oauth + body: + encoding: UTF-8 + string: '{"carrier_account_oauth_registrations":{"type":"AmazonShippingAccount"}}' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: "" + Host: + - api.easypost.com + Content-Type: + - application/json + Authorization: "" + response: + status: + code: 201 + message: Created + headers: + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - 1; mode=block + X-Content-Type-Options: + - nosniff + X-Download-Options: + - noopen + X-Permitted-Cross-Domain-Policies: + - none + Referrer-Policy: + - strict-origin-when-cross-origin + Easypost-Api-Version: + - '2015-01-01' + Vary: + - EasyPost-Api-Version + X-Ep-Request-Uuid: + - ef2f756f6ad13793e2bc497c00087ee6 + Cache-Control: + - private, no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + Content-Type: + - application/json; charset=utf-8 + X-Runtime: + - '0.109750' + Transfer-Encoding: + - chunked + X-Node: + - web124azw + X-Version-Label: + - easypost-202610151955-b13716d895-main + X-Backend: + - easypost + X-Proxied: + - extlb1azw ff4cfe6eb5 + - intlb2azw f29267e751 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + body: + encoding: UTF-8 + string: '{"id":"ca_73cb2a439c7545928d2c75ddf2cb98ab","object":"CarrierAccount","type":"AmazonShippingAccount","clone":false,"created_at":"2026-10-15T20:29:07Z","updated_at":"2026-10-15T20:29:07Z","description":null,"reference":null,"billing_type":"carrier","readable":"Amazon + Shipping","logo":null,"fields":[],"credentials":{},"test_credentials":{}}' + recorded_at: Thu, 15 Oct 2026 20:29:07 GMT +- request: + method: delete + uri: https://api.easypost.com/v2/carrier_accounts/ca_73cb2a439c7545928d2c75ddf2cb98ab + body: + encoding: US-ASCII + string: '' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: "" + Host: + - api.easypost.com + Content-Type: + - application/json + Authorization: "" + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - 1; mode=block + X-Content-Type-Options: + - nosniff + X-Download-Options: + - noopen + X-Permitted-Cross-Domain-Policies: + - none + Referrer-Policy: + - strict-origin-when-cross-origin + Easypost-Api-Version: + - '2015-01-01' + Vary: + - EasyPost-Api-Version + X-Ep-Request-Uuid: + - cdd585306ad13793e2bc49970008911d + Cache-Control: + - private, no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + Content-Type: + - application/json; charset=utf-8 + X-Runtime: + - '0.070328' + Transfer-Encoding: + - chunked + X-Node: + - web108azw + X-Version-Label: + - easypost-202610151955-b13716d895-main + X-Backend: + - easypost + X-Proxied: + - extlb2azw ff4cfe6eb5 + - intlb4azw f29267e751 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + body: + encoding: UTF-8 + string: "{}" + recorded_at: Thu, 15 Oct 2026 20:29:08 GMT +recorded_with: VCR 6.4.0 diff --git a/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_FedexAccount_account_creation.yml b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_FedexAccount_account_creation.yml new file mode 100644 index 00000000..0363d178 --- /dev/null +++ b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_FedexAccount_account_creation.yml @@ -0,0 +1,73 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.easypost.com/v2/carrier_accounts/register + body: + encoding: UTF-8 + string: '{"carrier_account":{"type":"FedexAccount","registration_data":{}}}' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: "" + Host: + - api.easypost.com + Content-Type: + - application/json + Authorization: "" + response: + status: + code: 410 + message: Gone + headers: + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - 1; mode=block + X-Content-Type-Options: + - nosniff + X-Download-Options: + - noopen + X-Permitted-Cross-Domain-Policies: + - none + Referrer-Policy: + - strict-origin-when-cross-origin + Easypost-Api-Version: + - '2015-01-01' + Vary: + - EasyPost-Api-Version + X-Ep-Request-Uuid: + - ef2f75706ad13793e2bc497600087ea1 + Cache-Control: + - private, no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + Content-Type: + - application/json; charset=utf-8 + X-Runtime: + - '0.044105' + Transfer-Encoding: + - chunked + X-Node: + - web109azw + X-Version-Label: + - easypost-202610151955-b13716d895-main + X-Backend: + - easypost + X-Proxied: + - extlb1azw ff4cfe6eb5 + - intlb4azw f29267e751 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + body: + encoding: UTF-8 + string: '{"error":{"code":"GONE","message":"The requested resource is no longer + available at the server and no forwarding address is known.","errors":[{"message":"FedEx + account registrations must use the multi-factor authentication (MFA) registration + workflow. See: https://support.easypost.com/hc/en-us/articles/35262738410253-FedEx-Multi-Factor-Authentication"}]}}' + recorded_at: Thu, 15 Oct 2026 20:29:07 GMT +recorded_with: VCR 6.4.0 diff --git a/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_FedexDefaultAccount_account_creation.yml b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_FedexDefaultAccount_account_creation.yml new file mode 100644 index 00000000..a96d8c99 --- /dev/null +++ b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_FedexDefaultAccount_account_creation.yml @@ -0,0 +1,75 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.easypost.com/v2/carrier_accounts/open + body: + encoding: UTF-8 + string: '{"carrier_account":{"type":"FedexDefaultAccount","registration_data":{}}}' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: "" + Host: + - api.easypost.com + Content-Type: + - application/json + Authorization: "" + response: + status: + code: 422 + message: Unprocessable Entity + headers: + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - 1; mode=block + X-Content-Type-Options: + - nosniff + X-Download-Options: + - noopen + X-Permitted-Cross-Domain-Policies: + - none + Referrer-Policy: + - strict-origin-when-cross-origin + Easypost-Api-Version: + - '2015-01-01' + Vary: + - EasyPost-Api-Version + X-Ep-Request-Uuid: + - 5218e5896ad13791e2bc460200087cda + Cache-Control: + - private, no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + Content-Type: + - application/json; charset=utf-8 + X-Runtime: + - '0.046517' + Transfer-Encoding: + - chunked + X-Node: + - web111azw + X-Version-Label: + - easypost-202610151955-b13716d895-main + X-Backend: + - easypost + X-Proxied: + - extlb1azw ff4cfe6eb5 + - intlb4azw f29267e751 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + body: + encoding: UTF-8 + string: '{"error":{"code":"UNPROCESSABLE_ENTITY","message":"The request was + understood, but cannot be processed.","errors":[{"field":"name","message":"is + missing"},{"field":"street1","message":"is missing"},{"field":"city","message":"is + missing"},{"field":"state","message":"is missing"},{"field":"postal_code","message":"is + missing"},{"field":"country","message":"is missing"},{"field":"phone","message":"is + missing"},{"field":"email","message":"is missing"}]}}' + recorded_at: Thu, 15 Oct 2026 20:29:05 GMT +recorded_with: VCR 6.4.0 diff --git a/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_FedexSmartpostAccount_account_creation.yml b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_FedexSmartpostAccount_account_creation.yml new file mode 100644 index 00000000..5a2b2f10 --- /dev/null +++ b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_FedexSmartpostAccount_account_creation.yml @@ -0,0 +1,73 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.easypost.com/v2/carrier_accounts/register + body: + encoding: UTF-8 + string: '{"carrier_account":{"type":"FedexSmartpostAccount","registration_data":{}}}' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: "" + Host: + - api.easypost.com + Content-Type: + - application/json + Authorization: "" + response: + status: + code: 410 + message: Gone + headers: + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - 1; mode=block + X-Content-Type-Options: + - nosniff + X-Download-Options: + - noopen + X-Permitted-Cross-Domain-Policies: + - none + Referrer-Policy: + - strict-origin-when-cross-origin + Easypost-Api-Version: + - '2015-01-01' + Vary: + - EasyPost-Api-Version + X-Ep-Request-Uuid: + - 5218e5876ad13793e2bc497900087ec3 + Cache-Control: + - private, no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + Content-Type: + - application/json; charset=utf-8 + X-Runtime: + - '0.041263' + Transfer-Encoding: + - chunked + X-Node: + - web119azw + X-Version-Label: + - easypost-202610151955-b13716d895-main + X-Backend: + - easypost + X-Proxied: + - extlb1azw ff4cfe6eb5 + - intlb2azw f29267e751 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + body: + encoding: UTF-8 + string: '{"error":{"code":"GONE","message":"The requested resource is no longer + available at the server and no forwarding address is known.","errors":[{"message":"FedEx + account registrations must use the multi-factor authentication (MFA) registration + workflow. See: https://support.easypost.com/hc/en-us/articles/35262738410253-FedEx-Multi-Factor-Authentication"}]}}' + recorded_at: Thu, 15 Oct 2026 20:29:07 GMT +recorded_with: VCR 6.4.0 diff --git a/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_GofoWalletAccount_account_creation.yml b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_GofoWalletAccount_account_creation.yml new file mode 100644 index 00000000..72f5d7f2 --- /dev/null +++ b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_GofoWalletAccount_account_creation.yml @@ -0,0 +1,139 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.easypost.com/v2/carrier_accounts/open + body: + encoding: UTF-8 + string: '{"carrier_account":{"type":"GofoWalletAccount","registration_data":{}}}' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: "" + Host: + - api.easypost.com + Content-Type: + - application/json + Authorization: "" + response: + status: + code: 201 + message: Created + headers: + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - 1; mode=block + X-Content-Type-Options: + - nosniff + X-Download-Options: + - noopen + X-Permitted-Cross-Domain-Policies: + - none + Referrer-Policy: + - strict-origin-when-cross-origin + Easypost-Api-Version: + - '2015-01-01' + Vary: + - EasyPost-Api-Version + X-Ep-Request-Uuid: + - 5218e5866ad13792e2bc461c00087d07 + Cache-Control: + - private, no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + Content-Type: + - application/json; charset=utf-8 + X-Runtime: + - '0.345986' + Transfer-Encoding: + - chunked + X-Node: + - web124azw + X-Version-Label: + - easypost-202610151955-b13716d895-main + X-Backend: + - easypost + X-Proxied: + - extlb1azw ff4cfe6eb5 + - intlb1azw f29267e751 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + body: + encoding: UTF-8 + string: '{"id":"ca_64b4dc6f384841ab969e4af66dd04f63","object":"CarrierAccount","type":"GofoWalletAccount","clone":false,"created_at":"2026-10-15T20:29:06Z","updated_at":"2026-10-15T20:29:06Z","description":"GOFO + Wallet Account","reference":null,"billing_type":"easypost","readable":"GOFO + Wallet","logo":null,"fields":[],"credentials":{},"test_credentials":{}}' + recorded_at: Thu, 15 Oct 2026 20:29:06 GMT +- request: + method: delete + uri: https://api.easypost.com/v2/carrier_accounts/ca_64b4dc6f384841ab969e4af66dd04f63 + body: + encoding: US-ASCII + string: '' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: "" + Host: + - api.easypost.com + Content-Type: + - application/json + Authorization: "" + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - 1; mode=block + X-Content-Type-Options: + - nosniff + X-Download-Options: + - noopen + X-Permitted-Cross-Domain-Policies: + - none + Referrer-Policy: + - strict-origin-when-cross-origin + Easypost-Api-Version: + - '2015-01-01' + Vary: + - EasyPost-Api-Version + X-Ep-Request-Uuid: + - aebfacae6ad13792e2bc463b006220da + Cache-Control: + - private, no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + Content-Type: + - application/json; charset=utf-8 + X-Runtime: + - '0.083311' + Transfer-Encoding: + - chunked + X-Node: + - web124azw + X-Version-Label: + - easypost-202610151955-b13716d895-main + X-Backend: + - easypost + X-Proxied: + - extlb3azw ff4cfe6eb5 + - intlb4azw f29267e751 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + body: + encoding: UTF-8 + string: "{}" + recorded_at: Thu, 15 Oct 2026 20:29:06 GMT +recorded_with: VCR 6.4.0 diff --git a/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_UniUniWalletAccount_account_creation.yml b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_UniUniWalletAccount_account_creation.yml new file mode 100644 index 00000000..fd439ed3 --- /dev/null +++ b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_UniUniWalletAccount_account_creation.yml @@ -0,0 +1,139 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.easypost.com/v2/carrier_accounts/open + body: + encoding: UTF-8 + string: '{"carrier_account":{"type":"UniUniWalletAccount","registration_data":{}}}' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: "" + Host: + - api.easypost.com + Content-Type: + - application/json + Authorization: "" + response: + status: + code: 201 + message: Created + headers: + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - 1; mode=block + X-Content-Type-Options: + - nosniff + X-Download-Options: + - noopen + X-Permitted-Cross-Domain-Policies: + - none + Referrer-Policy: + - strict-origin-when-cross-origin + Easypost-Api-Version: + - '2015-01-01' + Vary: + - EasyPost-Api-Version + X-Ep-Request-Uuid: + - ef2f756f6ad13792e2bc464200087df0 + Cache-Control: + - private, no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + Content-Type: + - application/json; charset=utf-8 + X-Runtime: + - '0.099442' + Transfer-Encoding: + - chunked + X-Node: + - web112azw + X-Version-Label: + - easypost-202610151955-b13716d895-main + X-Backend: + - easypost + X-Proxied: + - extlb1azw ff4cfe6eb5 + - intlb4azw f29267e751 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + body: + encoding: UTF-8 + string: '{"id":"ca_4cecbb8b28724ab9995a7e447d2f7108","object":"CarrierAccount","type":"UniUniWalletAccount","clone":false,"created_at":"2026-10-15T20:29:06Z","updated_at":"2026-10-15T20:29:06Z","description":"UniUni + Wallet Account","reference":null,"billing_type":"easypost","readable":"UniUni + Wallet","logo":null,"fields":[],"credentials":{},"test_credentials":{}}' + recorded_at: Thu, 15 Oct 2026 20:29:06 GMT +- request: + method: delete + uri: https://api.easypost.com/v2/carrier_accounts/ca_4cecbb8b28724ab9995a7e447d2f7108 + body: + encoding: US-ASCII + string: '' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: "" + Host: + - api.easypost.com + Content-Type: + - application/json + Authorization: "" + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - 1; mode=block + X-Content-Type-Options: + - nosniff + X-Download-Options: + - noopen + X-Permitted-Cross-Domain-Policies: + - none + Referrer-Policy: + - strict-origin-when-cross-origin + Easypost-Api-Version: + - '2015-01-01' + Vary: + - EasyPost-Api-Version + X-Ep-Request-Uuid: + - cdd5852d6ad13792e2bc465d00089011 + Cache-Control: + - private, no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + Content-Type: + - application/json; charset=utf-8 + X-Runtime: + - '0.072038' + Transfer-Encoding: + - chunked + X-Node: + - web104azw + X-Version-Label: + - easypost-202610151955-b13716d895-main + X-Backend: + - easypost + X-Proxied: + - extlb2azw ff4cfe6eb5 + - intlb2azw f29267e751 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + body: + encoding: UTF-8 + string: "{}" + recorded_at: Thu, 15 Oct 2026 20:29:07 GMT +recorded_with: VCR 6.4.0 diff --git a/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_UpsAccount_account_creation.yml b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_UpsAccount_account_creation.yml new file mode 100644 index 00000000..275ddb4c --- /dev/null +++ b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_UpsAccount_account_creation.yml @@ -0,0 +1,72 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.easypost.com/v2/carrier_accounts/register_oauth + body: + encoding: UTF-8 + string: '{"carrier_account_oauth_registrations":{"type":"UpsAccount"}}' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: "" + Host: + - api.easypost.com + Content-Type: + - application/json + Authorization: "" + response: + status: + code: 422 + message: Unprocessable Entity + headers: + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - 1; mode=block + X-Content-Type-Options: + - nosniff + X-Download-Options: + - noopen + X-Permitted-Cross-Domain-Policies: + - none + Referrer-Policy: + - strict-origin-when-cross-origin + Easypost-Api-Version: + - '2015-01-01' + Vary: + - EasyPost-Api-Version + X-Ep-Request-Uuid: + - aebfacac6ad13794e2bc499b006222a9 + Cache-Control: + - private, no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + Content-Type: + - application/json; charset=utf-8 + X-Runtime: + - '0.026238' + Transfer-Encoding: + - chunked + X-Node: + - web119azw + X-Version-Label: + - easypost-202610151955-b13716d895-main + X-Backend: + - easypost + X-Proxied: + - extlb3azw ff4cfe6eb5 + - intlb2azw f29267e751 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + body: + encoding: UTF-8 + string: '{"error":{"code":"UNPROCESSABLE_ENTITY","message":"The request was + understood, but cannot be processed.","errors":[{"field":"account_number","message":"The + provided Carrier Account''s Account Number is required but missing."}]}}' + recorded_at: Thu, 15 Oct 2026 20:29:08 GMT +recorded_with: VCR 6.4.0 diff --git a/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_UpsDapAccount_account_creation.yml b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_UpsDapAccount_account_creation.yml new file mode 100644 index 00000000..01e096e6 --- /dev/null +++ b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_UpsDapAccount_account_creation.yml @@ -0,0 +1,72 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.easypost.com/v2/carrier_accounts/open + body: + encoding: UTF-8 + string: '{"carrier_account":{"type":"UpsDapAccount","registration_data":{}}}' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: "" + Host: + - api.easypost.com + Content-Type: + - application/json + Authorization: "" + response: + status: + code: 422 + message: Unprocessable Entity + headers: + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - 1; mode=block + X-Content-Type-Options: + - nosniff + X-Download-Options: + - noopen + X-Permitted-Cross-Domain-Policies: + - none + Referrer-Policy: + - strict-origin-when-cross-origin + Easypost-Api-Version: + - '2015-01-01' + Vary: + - EasyPost-Api-Version + X-Ep-Request-Uuid: + - 5218e5876ad13792e2bc463f00087dca + Cache-Control: + - private, no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + Content-Type: + - application/json; charset=utf-8 + X-Runtime: + - '0.048185' + Transfer-Encoding: + - chunked + X-Node: + - web107azw + X-Version-Label: + - easypost-202610151955-b13716d895-main + X-Backend: + - easypost + X-Proxied: + - extlb1azw ff4cfe6eb5 + - intlb1azw f29267e751 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + body: + encoding: UTF-8 + string: '{"error":{"code":"UNPROCESSABLE_ENTITY","message":"The request was + understood, but cannot be processed.","errors":[{"field":"type","message":"Cannot + open a UPS DAP account for a user with an existing UPS account"}]}}' + recorded_at: Thu, 15 Oct 2026 20:29:06 GMT +recorded_with: VCR 6.4.0 diff --git a/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_UpsMailInnovationsAccount_account_creation.yml b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_UpsMailInnovationsAccount_account_creation.yml new file mode 100644 index 00000000..b27ad3c3 --- /dev/null +++ b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_UpsMailInnovationsAccount_account_creation.yml @@ -0,0 +1,72 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.easypost.com/v2/carrier_accounts/register_oauth + body: + encoding: UTF-8 + string: '{"carrier_account_oauth_registrations":{"type":"UpsMailInnovationsAccount"}}' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: "" + Host: + - api.easypost.com + Content-Type: + - application/json + Authorization: "" + response: + status: + code: 422 + message: Unprocessable Entity + headers: + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - 1; mode=block + X-Content-Type-Options: + - nosniff + X-Download-Options: + - noopen + X-Permitted-Cross-Domain-Policies: + - none + Referrer-Policy: + - strict-origin-when-cross-origin + Easypost-Api-Version: + - '2015-01-01' + Vary: + - EasyPost-Api-Version + X-Ep-Request-Uuid: + - aebfacb16ad13794e2bc499e006222d3 + Cache-Control: + - private, no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + Content-Type: + - application/json; charset=utf-8 + X-Runtime: + - '0.023097' + Transfer-Encoding: + - chunked + X-Node: + - web112azw + X-Version-Label: + - easypost-202610151955-b13716d895-main + X-Backend: + - easypost + X-Proxied: + - extlb3azw ff4cfe6eb5 + - intlb4azw f29267e751 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + body: + encoding: UTF-8 + string: '{"error":{"code":"UNPROCESSABLE_ENTITY","message":"The request was + understood, but cannot be processed.","errors":[{"field":"account_number","message":"The + provided Carrier Account''s Account Number is required but missing."}]}}' + recorded_at: Thu, 15 Oct 2026 20:29:08 GMT +recorded_with: VCR 6.4.0 diff --git a/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_UpsSurepostAccount_account_creation.yml b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_UpsSurepostAccount_account_creation.yml new file mode 100644 index 00000000..49abba2e --- /dev/null +++ b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_UpsSurepostAccount_account_creation.yml @@ -0,0 +1,74 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.easypost.com/v2/carrier_accounts/register_oauth + body: + encoding: UTF-8 + string: '{"carrier_account_oauth_registrations":{"type":"UpsSurepostAccount"}}' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: "" + Host: + - api.easypost.com + Content-Type: + - application/json + Authorization: "" + response: + status: + code: 422 + message: Unprocessable Entity + headers: + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - 1; mode=block + X-Content-Type-Options: + - nosniff + X-Download-Options: + - noopen + X-Permitted-Cross-Domain-Policies: + - none + Referrer-Policy: + - strict-origin-when-cross-origin + Easypost-Api-Version: + - '2015-01-01' + Vary: + - EasyPost-Api-Version + X-Ep-Request-Uuid: + - add87ec86ad13794e2bc49b8006222f9 + Cache-Control: + - private, no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + Content-Type: + - application/json; charset=utf-8 + X-Runtime: + - '0.034157' + Transfer-Encoding: + - chunked + X-Node: + - web100azw + X-Version-Label: + - easypost-202610151955-b13716d895-main + X-Backend: + - easypost + X-Canary: + - direct + X-Proxied: + - extlb3azw ff4cfe6eb5 + - intlb2azw f29267e751 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + body: + encoding: UTF-8 + string: '{"error":{"code":"UNPROCESSABLE_ENTITY","message":"The request was + understood, but cannot be processed.","errors":[{"field":"account_number","message":"The + provided Carrier Account''s Account Number is required but missing."}]}}' + recorded_at: Thu, 15 Oct 2026 20:29:08 GMT +recorded_with: VCR 6.4.0 diff --git a/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_UspsShipAccount_account_creation.yml b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_UspsShipAccount_account_creation.yml new file mode 100644 index 00000000..42753945 --- /dev/null +++ b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_UspsShipAccount_account_creation.yml @@ -0,0 +1,138 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.easypost.com/v2/carrier_accounts/register_oauth + body: + encoding: UTF-8 + string: '{"carrier_account_oauth_registrations":{"type":"UspsShipAccount"}}' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: "" + Host: + - api.easypost.com + Content-Type: + - application/json + Authorization: "" + response: + status: + code: 201 + message: Created + headers: + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - 1; mode=block + X-Content-Type-Options: + - nosniff + X-Download-Options: + - noopen + X-Permitted-Cross-Domain-Policies: + - none + Referrer-Policy: + - strict-origin-when-cross-origin + Easypost-Api-Version: + - '2015-01-01' + Vary: + - EasyPost-Api-Version + X-Ep-Request-Uuid: + - aebfacb36ad13794e2bc49bb00622328 + Cache-Control: + - private, no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + Content-Type: + - application/json; charset=utf-8 + X-Runtime: + - '0.116552' + Transfer-Encoding: + - chunked + X-Node: + - web124azw + X-Version-Label: + - easypost-202610151955-b13716d895-main + X-Backend: + - easypost + X-Proxied: + - extlb3azw ff4cfe6eb5 + - intlb1azw f29267e751 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + body: + encoding: UTF-8 + string: '{"id":"ca_4dc73a6aaa964802810e6d0e1823dce2","object":"CarrierAccount","type":"UspsShipAccount","clone":false,"created_at":"2026-10-15T20:29:08Z","updated_at":"2026-10-15T20:29:08Z","description":null,"reference":null,"billing_type":"carrier","readable":"Usps + Ship","logo":null,"fields":[],"credentials":{},"test_credentials":{}}' + recorded_at: Thu, 15 Oct 2026 20:29:08 GMT +- request: + method: delete + uri: https://api.easypost.com/v2/carrier_accounts/ca_4dc73a6aaa964802810e6d0e1823dce2 + body: + encoding: US-ASCII + string: '' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: "" + Host: + - api.easypost.com + Content-Type: + - application/json + Authorization: "" + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - 1; mode=block + X-Content-Type-Options: + - nosniff + X-Download-Options: + - noopen + X-Permitted-Cross-Domain-Policies: + - none + Referrer-Policy: + - strict-origin-when-cross-origin + Easypost-Api-Version: + - '2015-01-01' + Vary: + - EasyPost-Api-Version + X-Ep-Request-Uuid: + - 5218e5886ad13794e2bc49bf0008800e + Cache-Control: + - private, no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + Content-Type: + - application/json; charset=utf-8 + X-Runtime: + - '0.079508' + Transfer-Encoding: + - chunked + X-Node: + - web119azw + X-Version-Label: + - easypost-202610151955-b13716d895-main + X-Backend: + - easypost + X-Proxied: + - extlb1azw ff4cfe6eb5 + - intlb1azw f29267e751 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + body: + encoding: UTF-8 + string: "{}" + recorded_at: Thu, 15 Oct 2026 20:29:08 GMT +recorded_with: VCR 6.4.0 diff --git a/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_VehoWalletAccount_account_creation.yml b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_VehoWalletAccount_account_creation.yml new file mode 100644 index 00000000..92c496cf --- /dev/null +++ b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_create_routes_VehoWalletAccount_account_creation.yml @@ -0,0 +1,138 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.easypost.com/v2/carrier_accounts/open + body: + encoding: UTF-8 + string: '{"carrier_account":{"type":"VehoWalletAccount","registration_data":{}}}' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: "" + Host: + - api.easypost.com + Content-Type: + - application/json + Authorization: "" + response: + status: + code: 201 + message: Created + headers: + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - 1; mode=block + X-Content-Type-Options: + - nosniff + X-Download-Options: + - noopen + X-Permitted-Cross-Domain-Policies: + - none + Referrer-Policy: + - strict-origin-when-cross-origin + Easypost-Api-Version: + - '2015-01-01' + Vary: + - EasyPost-Api-Version + X-Ep-Request-Uuid: + - aebfacb36ad13793e2bc466100622184 + Cache-Control: + - private, no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + Content-Type: + - application/json; charset=utf-8 + X-Runtime: + - '0.081736' + Transfer-Encoding: + - chunked + X-Node: + - web125azw + X-Version-Label: + - easypost-202610151955-b13716d895-main + X-Backend: + - easypost + X-Proxied: + - extlb3azw ff4cfe6eb5 + - intlb1azw f29267e751 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + body: + encoding: UTF-8 + string: '{"id":"ca_123d4bf1ee28460ea266af6d899f8f8b","object":"CarrierAccount","type":"VehoWalletAccount","clone":false,"created_at":"2026-10-15T20:29:07Z","updated_at":"2026-10-15T20:29:07Z","description":"Veho + Account","reference":null,"billing_type":"easypost","readable":"Veho","logo":null,"fields":[],"credentials":{},"test_credentials":{}}' + recorded_at: Thu, 15 Oct 2026 20:29:07 GMT +- request: + method: delete + uri: https://api.easypost.com/v2/carrier_accounts/ca_123d4bf1ee28460ea266af6d899f8f8b + body: + encoding: US-ASCII + string: '' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: "" + Host: + - api.easypost.com + Content-Type: + - application/json + Authorization: "" + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - 1; mode=block + X-Content-Type-Options: + - nosniff + X-Download-Options: + - noopen + X-Permitted-Cross-Domain-Policies: + - none + Referrer-Policy: + - strict-origin-when-cross-origin + Easypost-Api-Version: + - '2015-01-01' + Vary: + - EasyPost-Api-Version + X-Ep-Request-Uuid: + - aebfacb46ad13793e2bc4664006221ae + Cache-Control: + - private, no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + Content-Type: + - application/json; charset=utf-8 + X-Runtime: + - '0.080009' + Transfer-Encoding: + - chunked + X-Node: + - web103azw + X-Version-Label: + - easypost-202610151955-b13716d895-main + X-Backend: + - easypost + X-Proxied: + - extlb3azw ff4cfe6eb5 + - intlb4azw f29267e751 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + body: + encoding: UTF-8 + string: "{}" + recorded_at: Thu, 15 Oct 2026 20:29:07 GMT +recorded_with: VCR 6.4.0 diff --git a/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_update_updates_an_ups_account.yml b/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_update_updates_an_ups_account.yml deleted file mode 100644 index 4f50bcde..00000000 --- a/spec/cassettes/carrier_account/EasyPost_Services_CarrierAccount_update_updates_an_ups_account.yml +++ /dev/null @@ -1,255 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: https://api.easypost.com/v2/carrier_accounts/register_oauth - body: - encoding: UTF-8 - string: '{"carrier_account_oauth_registrations":{"type":"UpsAccount","account_number":"123456789"}}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: "" - Host: - - api.easypost.com - Content-Type: - - application/json - Authorization: "" - response: - status: - code: 201 - message: Created - headers: - X-Frame-Options: - - SAMEORIGIN - X-Xss-Protection: - - 1; mode=block - X-Content-Type-Options: - - nosniff - X-Download-Options: - - noopen - X-Permitted-Cross-Domain-Policies: - - none - Referrer-Policy: - - strict-origin-when-cross-origin - X-Ep-Request-Uuid: - - 6be4a8f46830cb35e7873c200041a96c - Cache-Control: - - private, no-cache, no-store - Pragma: - - no-cache - Expires: - - '0' - Content-Type: - - application/json; charset=utf-8 - X-Runtime: - - '0.077006' - Transfer-Encoding: - - chunked - X-Node: - - bigweb33nuq - X-Version-Label: - - easypost-202505231841-d89645a184-master - X-Backend: - - easypost - X-Proxied: - - extlb1nuq 99aac35317 - - intlb4nuq 668d3fc830 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains; preload - body: - encoding: UTF-8 - string: '{"id":"ca_8d60e586beaf4f6b9079c4879c5a2b66","object":"CarrierAccount","type":"UpsAccount","clone":false,"created_at":"2025-05-23T19:23:33Z","updated_at":"2025-05-23T19:23:33Z","description":null,"reference":null,"billing_type":"carrier","readable":"UPS","logo":null,"fields":[],"credentials":{},"test_credentials":{}}' - recorded_at: Fri, 23 May 2025 19:23:33 GMT -- request: - method: get - uri: https://api.easypost.com/v2/carrier_accounts/ca_8d60e586beaf4f6b9079c4879c5a2b66 - body: - encoding: US-ASCII - string: '' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: "" - Host: - - api.easypost.com - Content-Type: - - application/json - Authorization: "" - response: - status: - code: 200 - message: OK - headers: - X-Frame-Options: - - SAMEORIGIN - X-Xss-Protection: - - 1; mode=block - X-Content-Type-Options: - - nosniff - X-Download-Options: - - noopen - X-Permitted-Cross-Domain-Policies: - - none - Referrer-Policy: - - strict-origin-when-cross-origin - X-Ep-Request-Uuid: - - 6be4a8f46830cb35e7873c3a0041a9e0 - Cache-Control: - - private, no-cache, no-store - Pragma: - - no-cache - Expires: - - '0' - Content-Type: - - application/json; charset=utf-8 - X-Runtime: - - '0.029181' - Transfer-Encoding: - - chunked - X-Node: - - bigweb58nuq - X-Version-Label: - - easypost-202505231841-d89645a184-master - X-Backend: - - easypost - X-Proxied: - - extlb1nuq 99aac35317 - - intlb3nuq 668d3fc830 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains; preload - body: - encoding: UTF-8 - string: '{"id":"ca_8d60e586beaf4f6b9079c4879c5a2b66","object":"CarrierAccount","type":"UpsAccount","clone":false,"created_at":"2025-05-23T19:23:33Z","updated_at":"2025-05-23T19:23:33Z","description":null,"reference":null,"billing_type":"carrier","readable":"UPS","logo":null,"fields":[],"credentials":{},"test_credentials":{}}' - recorded_at: Fri, 23 May 2025 19:23:33 GMT -- request: - method: put - uri: https://api.easypost.com/v2/carrier_accounts/ca_8d60e586beaf4f6b9079c4879c5a2b66 - body: - encoding: UTF-8 - string: '{"carrier_account_oauth_registrations":{"account_number":"987654321"}}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: "" - Host: - - api.easypost.com - Content-Type: - - application/json - Authorization: "" - response: - status: - code: 200 - message: OK - headers: - X-Frame-Options: - - SAMEORIGIN - X-Xss-Protection: - - 1; mode=block - X-Content-Type-Options: - - nosniff - X-Download-Options: - - noopen - X-Permitted-Cross-Domain-Policies: - - none - Referrer-Policy: - - strict-origin-when-cross-origin - X-Ep-Request-Uuid: - - 6be4a8f16830cb35e7873c3d0041aa44 - Cache-Control: - - private, no-cache, no-store - Pragma: - - no-cache - Expires: - - '0' - Content-Type: - - application/json; charset=utf-8 - X-Runtime: - - '0.074220' - Transfer-Encoding: - - chunked - X-Node: - - bigweb59nuq - X-Version-Label: - - easypost-202505231841-d89645a184-master - X-Backend: - - easypost - X-Proxied: - - extlb1nuq 99aac35317 - - intlb4nuq 668d3fc830 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains; preload - body: - encoding: UTF-8 - string: '{"id":"ca_8d60e586beaf4f6b9079c4879c5a2b66","object":"CarrierAccount","type":"UpsAccount","clone":false,"created_at":"2025-05-23T19:23:33Z","updated_at":"2025-05-23T19:23:33Z","description":null,"reference":null,"billing_type":"carrier","readable":"UPS","logo":null,"fields":[],"credentials":{},"test_credentials":{}}' - recorded_at: Fri, 23 May 2025 19:23:33 GMT -- request: - method: delete - uri: https://api.easypost.com/v2/carrier_accounts/ca_8d60e586beaf4f6b9079c4879c5a2b66 - body: - encoding: US-ASCII - string: '' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: "" - Host: - - api.easypost.com - Content-Type: - - application/json - Authorization: "" - response: - status: - code: 200 - message: OK - headers: - X-Frame-Options: - - SAMEORIGIN - X-Xss-Protection: - - 1; mode=block - X-Content-Type-Options: - - nosniff - X-Download-Options: - - noopen - X-Permitted-Cross-Domain-Policies: - - none - Referrer-Policy: - - strict-origin-when-cross-origin - X-Ep-Request-Uuid: - - 6be4a8f26830cb35e7873c400041aa9b - Cache-Control: - - private, no-cache, no-store - Pragma: - - no-cache - Expires: - - '0' - Content-Type: - - application/json; charset=utf-8 - X-Runtime: - - '0.115773' - Transfer-Encoding: - - chunked - X-Node: - - bigweb36nuq - X-Version-Label: - - easypost-202505231841-d89645a184-master - X-Backend: - - easypost - X-Proxied: - - extlb1nuq 99aac35317 - - intlb3nuq 668d3fc830 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains; preload - body: - encoding: UTF-8 - string: "{}" - recorded_at: Fri, 23 May 2025 19:23:34 GMT -recorded_with: VCR 6.3.1